Disconnect load-done handler when finalizing

This commit is contained in:
Arnaud Renevier 2008-08-03 04:58:45 +02:00 committed by Christian Dywan
parent 4a2e5c59f4
commit 539a8f35c8

View file

@ -797,7 +797,10 @@ midori_web_view_init (MidoriWebView* web_view)
static void
midori_web_view_finalize (GObject* object)
{
MidoriWebView* web_view = MIDORI_WEB_VIEW (object);
MidoriWebView* web_view;
WebKitWebFrame* web_frame;
web_view = MIDORI_WEB_VIEW (object);
if (web_view->icon)
g_object_unref (web_view->icon);
@ -813,6 +816,10 @@ midori_web_view_finalize (GObject* object)
if (web_view->xbel_item)
katze_xbel_item_unref (web_view->xbel_item);
web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
g_signal_handlers_disconnect_by_func (web_frame,
webkit_web_frame_load_done, web_view);
G_OBJECT_CLASS (midori_web_view_parent_class)->finalize (object);
}