Fix output of message on module unloading
authorMyhailo Danylenko <isbear@ukrpost.net>
Sat, 13 Mar 2010 19:51:54 +0200
changeset 1763 5b497046df40
parent 1762 e7ce50fe19a9
child 1764 6e856c5858c3
Fix output of message on module unloading
mcabber/mcabber/modules.c
--- a/mcabber/mcabber/modules.c	Sat Mar 13 18:17:10 2010 +0200
+++ 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;
 }