summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}