diff options
author | David Tardon <dtardon@redhat.com> | 2010-11-23 10:36:26 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-23 10:36:26 +0100 |
commit | 41fe8b78784522b7322f3e61db4542f69f2089ba (patch) | |
tree | 0a09ce1fcf33fa028cb23d36b8a5c51c3a13dd66 /sfx2 | |
parent | ab2f370724a5f4691e70302ae3958af36ef55388 (diff) |
Related: rhbz#650170 don't crash when quickstarter is exited by user
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 11 |
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; |