From: Daniel Carl <danielcarl@gmx.de>
Date: Wed, 26 Nov 2014 20:43:19 +0000 (+0100)
Subject: Fixed warning on quit by window destroy.
X-Git-Url: https://git.owens.tech/assets/wrapped.html/assets/wrapped.html/git?a=commitdiff_plain;h=6fea9ef2010e139d07590198d11967a796ef2fa7;p=vimb.git

Fixed warning on quit by window destroy.

If vimb was quit by the window manager, the webview was already cleared and
the call to stop loading caused a warning.
---

diff --git a/src/main.c b/src/main.c
index 685f17f..6c9d90e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();