summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2010-11-23 10:36:26 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-23 10:37:31 +0100
commit4c645168924f7115a3dd8c9fdaac6a1a6167a0a7 (patch)
tree235637dd95741e62e85923825f0c60e37dce9408 /sfx2/source/appl
parenta695cce9540178845ac294083a7f0c94c3f73542 (diff)
Related: rhbz#650170 don't crash when quickstarter is exited by user
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 3bb5b7729c..c28e73a543 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -409,8 +409,17 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray()
::SolarMutexGuard aGuard;
if( !pTrayIcon )
return;
- gtk_widget_destroy( GTK_WIDGET( pTrayIcon ) );
+
+ /* we have to set pTrayIcon to NULL now, because gtk_widget_destroy
+ * causes calling exit_quickstarter_cb (which then calls this func.)
+ * again -> crash.
+ * As an alternative, we could deregister the "destroy" signal here,
+ * but this is simpler .-)
+ */
+ GtkWidget* const pIcon = GTK_WIDGET( pTrayIcon );
pTrayIcon = NULL;
+ gtk_widget_destroy( pIcon );
+
pExitMenuItem = NULL;
pOpenMenuItem = NULL;
pDisableMenuItem = NULL;