]> spindle.queued.net Git - midori/commitdiff
Reference the hit test result before using it
authorChristian Dywan <christian@twotoasts.de>
Tue, 23 Nov 2010 21:57:47 +0000 (22:57 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 23 Nov 2010 21:59:19 +0000 (22:59 +0100)
It actually is owned by the WebKitWebView.

midori/midori-view.c

index 39172e25aacacc9c1a9056310b974091b5cd8a97..14da6ed611ba5494f895785f03c74a9e2db3b4b4 100644 (file)
@@ -1629,8 +1629,10 @@ midori_view_ensure_link_uri (MidoriView* view,
 
         event.x = ex;
         event.y = ey;
-        katze_object_assign (view->hit_test, webkit_web_view_get_hit_test_result (
-                             WEBKIT_WEB_VIEW (view->web_view), &event));
+        katze_object_assign (view->hit_test,
+            g_object_ref (
+            webkit_web_view_get_hit_test_result (
+            WEBKIT_WEB_VIEW (view->web_view), &event)));
         katze_assign (view->link_uri,
              katze_object_get_string (view->hit_test, "link-uri"));
     }