From cbdbb455ca43d10bf5af7df700097c6f7c343f7c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 20 Jan 2014 14:34:50 +0000 Subject: 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 --- src/modules/chat/chat_opts.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/modules/chat/chat_opts.cpp') 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; } -- cgit v1.2.3