Fix output of message on module unloading
authorMyhailo Danylenko <isbear@ukrpost.net>
Sat, 13 Mar 2010 19:51:54 +0200
changeset 1765 79e9669b2a16
parent 1758 499d3ec34188
child 1766 0852b90babf8
Fix output of message on module unloading
mcabber/mcabber/modules.c
--- a/mcabber/mcabber/modules.c	Sat Mar 13 14:51:13 2010 +0100
+++ b/mcabber/mcabber/modules.c	Sat Mar 13 19:51:54 2010 +0200
@@ -264,11 +264,11 @@
 
   // Destroy structure
   loaded_modules = g_slist_delete_link(loaded_modules, lmod);
+  // Output this here, as arg may point to module->name
+  scr_LogPrint(LPRINT_LOGNORM, "Unloaded module %s.", module->name);
   g_free(module->name);
   g_free(module);
 
-  scr_LogPrint(LPRINT_LOGNORM, "Unloaded module %s.", arg);
-
   return NULL;
 }