Sat, 24 Oct 2009 17:46:30 +0000
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.
| libpurple/plugins/perl/perl-handlers.c | file | annotate | diff | comparison | revisions |
--- 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); }