libpurple/plugins/perl/perl-handlers.c

changeset 28740
6861934437a3
parent 27120
d7503d775939
child 29340
1073f46cfe21
--- a/libpurple/plugins/perl/perl-handlers.c	Sat Oct 24 07:57:34 2009 +0000
+++ b/libpurple/plugins/perl/perl-handlers.c	Sat Oct 24 17:46:30 2009 +0000
@@ -649,6 +649,7 @@
 static void
 destroy_cmd_handler(PurplePerlCmdHandler *handler)
 {
+	purple_cmd_unregister(handler->id);
 	cmd_handlers = g_slist_remove(cmd_handlers, handler);
 
 	if (handler->callback != NULL)
@@ -705,7 +706,6 @@
 		return;
 	}
 
-	purple_cmd_unregister(id);
 	destroy_cmd_handler(handler);
 }
 

mercurial