libpurple/plugins/perl/perl-handlers.c

changeset 28740
6861934437a3
parent 27120
d7503d775939
child 29340
1073f46cfe21
equal deleted inserted replaced
28739:567b74189d8b 28740:6861934437a3
647 } 647 }
648 648
649 static void 649 static void
650 destroy_cmd_handler(PurplePerlCmdHandler *handler) 650 destroy_cmd_handler(PurplePerlCmdHandler *handler)
651 { 651 {
652 purple_cmd_unregister(handler->id);
652 cmd_handlers = g_slist_remove(cmd_handlers, handler); 653 cmd_handlers = g_slist_remove(cmd_handlers, handler);
653 654
654 if (handler->callback != NULL) 655 if (handler->callback != NULL)
655 SvREFCNT_dec(handler->callback); 656 SvREFCNT_dec(handler->callback);
656 657
703 if (handler == NULL) { 704 if (handler == NULL) {
704 croak("Invalid command id in removing a perl command handler.\n"); 705 croak("Invalid command id in removing a perl command handler.\n");
705 return; 706 return;
706 } 707 }
707 708
708 purple_cmd_unregister(id);
709 destroy_cmd_handler(handler); 709 destroy_cmd_handler(handler);
710 } 710 }
711 711
712 static void 712 static void
713 perl_pref_cb(const char *name, PurplePrefType type, gconstpointer value, 713 perl_pref_cb(const char *name, PurplePrefType type, gconstpointer value,

mercurial