--- sfx2.orig/source/appl/shutdownicon.cxx 2009-04-21 12:57:08.000000000 +0100 +++ sfx2.orig/source/appl/shutdownicon.cxx 2009-04-21 15:26:25.000000000 +0100 @@ -192,7 +192,9 @@ return; m_bInitialized = true; - (void) LoadModule( &m_pPlugin, &m_pInitSystray, &m_pDeInitSystray ); + if (!m_pPlugin) + (void) LoadModule( &m_pPlugin, &m_pInitSystray, &m_pDeInitSystray ); + m_bVeto = true; m_pInitSystray(); } @@ -201,15 +203,11 @@ { if (!m_bInitialized) return; + if (m_pDeInitSystray) m_pDeInitSystray(); m_bVeto = false; - m_pInitSystray = 0; - m_pDeInitSystray = 0; - if (m_pPlugin) - delete m_pPlugin; - m_pPlugin = 0; delete m_pFileDlg; m_pFileDlg = NULL; m_bInitialized = false; @@ -233,6 +231,11 @@ ShutdownIcon::~ShutdownIcon() { deInitSystray(); + //Bustage on dlclosing when: no qstarter, start writer, enable, close writer, choose disable/quit + //dlclose gets called and pulls .so from under hack-tower +#ifndef UNX + delete m_pPlugin; +#endif } // ---------------------------------------------------------------------------