diff options
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 9 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber.h | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 663f68d4c4..25734504cc 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HINSTANCE hInst;
int hLangpack;
+bool g_bShutdown = false;
int g_cbCountries;
CountryListEntry *g_countries;
@@ -162,6 +163,12 @@ static int OnModulesLoaded(WPARAM, LPARAM) return 0;
}
+static int OnPreShutdown(WPARAM, LPARAM)
+{
+ g_bShutdown = true;
+ return 0;
+}
+
///////////////////////////////////////////////////////////////////////////////
// OnLoad - initialize the plugin instance
@@ -218,8 +225,8 @@ extern "C" int __declspec(dllexport) Load() g_XstatusIconsInit();
g_MenuInit();
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
JabberUserInfoInit();
-
return 0;
}
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index 92db509934..6787f0eca4 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -583,6 +583,8 @@ extern HANDLE hExtraActivity; extern TCHAR szCoreVersion[];
+extern bool g_bShutdown;
+
extern int g_cbCountries;
extern struct CountryListEntry* g_countries;
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 027d9b0330..cebc1dcb5a 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -955,7 +955,8 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param) void CJabberProto::RebuildInfoFrame()
{
- CallFunctionAsync(sttRebuildInfoFrameApcProc, this);
+ if (!g_bShutdown)
+ CallFunctionAsync(sttRebuildInfoFrameApcProc, this);
}
////////////////////////////////////////////////////////////////////////
|