summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-10-01 14:01:25 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:52:53 +0100
commit03010b90d215c3525fe86cddff61c2b353a90db6 (patch)
tree8faba6d30dd9c65586bede3f125e22240ebfa2df /vcl
parentc7be8f17f57ea9661fd33435b34c58963f9255fc (diff)
revoke the watch when dying
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 592c83d16f50..df98065276bd 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -603,9 +603,9 @@ void GtkSalFrame::EnsureAppMenuWatch()
G_BUS_NAME_WATCHER_FLAGS_NONE,
on_registrar_available,
on_registrar_unavailable,
- reinterpret_cast<gpointer>(this),
+ static_cast<GtkSalFrame*>(this),
NULL);
- ensure_dbus_setup(gtk_widget_get_window(GTK_WIDGET(m_pWindow)), this);
+ ensure_dbus_setup(gtk_widget_get_window(GTK_WIDGET(m_pWindow)), static_cast<GtkSalFrame*>(this));
}
GtkSalFrame::~GtkSalFrame()
@@ -651,6 +651,8 @@ GtkSalFrame::~GtkSalFrame()
gtk_widget_destroy( GTK_WIDGET( m_pFixedContainer ) );
{
SolarMutexGuard aGuard;
+ if(m_nWatcherId)
+ g_bus_unwatch_name(m_nWatcherId);
if(m_pSalMenu)
static_cast<GtkSalMenu*>(m_pSalMenu)->DisconnectFrame();
if( m_pWindow )