summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-20 14:34:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-20 14:34:50 +0000
commitcbdbb455ca43d10bf5af7df700097c6f7c343f7c (patch)
tree7116f717752953ee4be17ff228888bc3cf2160c0 /src
parent3793a9bd61778cb068aa5338476a5513c13b989f (diff)
fix for a crash when Miranda cannot be started normally
git-svn-id: http://svn.miranda-ng.org/main/trunk@7788 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/modules/chat/chat_opts.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp
index 2270dc5e65..cff6b8d0aa 100644
--- a/src/modules/chat/chat_opts.cpp
+++ b/src/modules/chat/chat_opts.cpp
@@ -258,6 +258,9 @@ void LoadGlobalSettings(void)
static void FreeGlobalSettings(void)
{
+ if (g_Settings == NULL)
+ return;
+
mir_free(g_Settings->pszTimeStamp);
mir_free(g_Settings->pszTimeStampLog);
mir_free(g_Settings->pszIncomingNick);
@@ -270,6 +273,8 @@ static void FreeGlobalSettings(void)
DeleteObject(g_Settings->UserListFont);
if (g_Settings->UserListHeadingsFont)
DeleteObject(g_Settings->UserListHeadingsFont);
+ if (g_Settings->NameFont)
+ DeleteObject(g_Settings->NameFont);
}
void SetIndentSize()
@@ -341,6 +346,5 @@ int OptionsInit(void)
int OptionsUnInit(void)
{
FreeGlobalSettings();
- DeleteObject(g_Settings->NameFont);
return 0;
}