From 890f31bd076da194c5b7ea8022e72c8aad4a0de1 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 13 Oct 2012 20:37:32 -0400 Subject: Bug 685786 - EWebView: Signal handlers never disconnected Both EWebView and EMailDisplay listen for "changed" signals from a GSettings instance, passing itself as the 'user_data' to the signal handler e_web_view_update_fonts(). But in both cases the signal handler was left connected after EWebView and EMailDisplay were finalized, resulting in the signal handler receiving a dangling pointer. Not using g_signal_connect_object() here because of the unresolved reference leak issue in GObject. The GSettings instance is likely cached internally and lives well beyond EWebView and EMailDisplay. --- widgets/misc/e-web-view.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'widgets/misc/e-web-view.c') diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c index e1fb5c54a6..84c473dc37 100644 --- a/widgets/misc/e-web-view.c +++ b/widgets/misc/e-web-view.c @@ -803,11 +803,17 @@ web_view_dispose (GObject *object) } if (priv->aliasing_settings != NULL) { + g_signal_handlers_disconnect_matched ( + priv->aliasing_settings, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, object); g_object_unref (priv->aliasing_settings); priv->aliasing_settings = NULL; } if (priv->font_settings != NULL) { + g_signal_handlers_disconnect_matched ( + priv->font_settings, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, object); g_object_unref (priv->font_settings); priv->font_settings = NULL; } -- cgit v1.2.3