pidgin: 43a9f069: Unregister commands registered by a perl...

sadrul at sadrul at
Sat Oct 24 13:50:42 EDT 2009

Revision: 43a9f0696967997615d88bfb9022e007dd973321
Ancestor: dd9f40f3139be5d2a0aababd7d892cb5be3cd3d2
Author: sadrul at
Date: 2009-10-24T17:46:30
Branch: im.pidgin.pidgin

Modified files:


Unregister commands registered by a perl-plugin when unloading it.

A perl plugin may not unregister a command, and that can cause a crash.
So the perl plugin loader will take care of unregistering the commands in
case the plugin itself leaves them behind.

-------------- next part --------------
--- libpurple/plugins/perl/perl-handlers.c	9ce4aa0be282b7b90a41358a796c051e76de0ee7
+++ libpurple/plugins/perl/perl-handlers.c	2011d190d936b5e90a132e189b1b80db06cc2c37
@@ -649,6 +649,7 @@ destroy_cmd_handler(PurplePerlCmdHandler
 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 @@ purple_perl_cmd_unregister(PurpleCmdId i
-	purple_cmd_unregister(id);

More information about the Commits mailing list