mcabber/mcabber/histolog.c
changeset 2253 5a107c907e71
parent 2252 2c7cca6dec6a
child 2258 1cc88b0efdb9
--- a/mcabber/mcabber/histolog.c	Sat Feb 27 11:02:19 2016 +0100
+++ b/mcabber/mcabber/histolog.c	Sat Feb 27 11:28:24 2016 +0100
@@ -397,6 +397,12 @@
   } else {
     const char *cfgdir = settings_get_mcabber_config_dir();
     const char *hdir = "/histo/";
+    if (!cfgdir) {
+      scr_LogPrint(LPRINT_LOGNORM, "ERROR: Cannot find out "
+                   "history log directory; logging DISABLED");
+      UseFileLogging = FileLoadLogs = FALSE;
+      return;
+    }
     RootDir = g_strdup_printf("%s%s", cfgdir, hdir);
   }
 
@@ -406,7 +412,7 @@
     g_free(RootDir);
     RootDir = NULL;
     scr_LogPrint(LPRINT_LOGNORM, "ERROR: Cannot access "
-                 "history log directory, logging DISABLED");
+                 "history log directory; logging DISABLED");
     UseFileLogging = FileLoadLogs = FALSE;
   }
 }