Fixed warning on quit by window destroy.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 26 Nov 2014 20:43:19 +0000 (21:43 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 26 Nov 2014 20:43:19 +0000 (21:43 +0100)
If vimb was quit by the window manager, the webview was already cleared and
the call to stop loading caused a warning.

src/main.c

index 685f17f..6c9d90e 100644 (file)
@@ -415,6 +415,8 @@ void vb_quit(gboolean force)
         return;
     }
 
+    webkit_web_view_stop_loading(vb.gui.webview);
+
     /* write last URL into file for recreation */
     if (vb.state.uri) {
         g_file_set_contents(vb.files[FILES_CLOSED], vb.state.uri, -1, NULL);
@@ -1512,9 +1514,6 @@ static void vb_cleanup(void)
 {
 
     completion_clean();
-
-    webkit_web_view_stop_loading(vb.gui.webview);
-
     map_cleanup();
     mode_cleanup();
     setting_cleanup();