]> spindle.queued.net Git - midori/commitdiff
Fix a memory leak when obtaining the selection from the web view
authorEnrico Tröger <enrico.troeger@uvena.de>
Thu, 12 Feb 2009 21:43:31 +0000 (22:43 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 12 Feb 2009 21:43:31 +0000 (22:43 +0100)
midori/midori-view.c

index 697974cec12a1180317a21891f03eaf8109acb76..dc35fc617efdd22fda81826a9776d0f3529affc9 100644 (file)
@@ -1757,8 +1757,8 @@ midori_view_has_selection (MidoriView* view)
 {
     g_return_val_if_fail (MIDORI_IS_VIEW (view), FALSE);
 
-    view->selected_text = webkit_web_view_get_selected_text (
-            WEBKIT_WEB_VIEW (view->web_view));
+    katze_assign (view->selected_text, webkit_web_view_get_selected_text (
+        WEBKIT_WEB_VIEW (view->web_view)));
     if (view->selected_text && *view->selected_text)
         return TRUE;
     else