pidgin: 4b9ca13f: Don't crash when $gc is undefined in a c...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Thu Oct 8 21:46:24 EDT 2009
-----------------------------------------------------------------
Revision: 4b9ca13f2987492c10363d58816d0a2e5bdee54c
Ancestor: bdbdc21f3f0cb3522913ed2daf5a79e5908e3db2
Author: darkrain42 at pidgin.im
Date: 2009-10-09T01:16:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4b9ca13f2987492c10363d58816d0a2e5bdee54c
Modified files:
libpurple/plugins/perl/common/Prpl.xs
ChangeLog:
Don't crash when $gc is undefined in a call to Purple::Prpl::send_raw.
Should Fixes #10222
-------------- next part --------------
============================================================
--- libpurple/plugins/perl/common/Prpl.xs d2a20de2fb6c0620e43ec12285ee93213a379719
+++ libpurple/plugins/perl/common/Prpl.xs c0489b3531592dcf4d6bee2355fb3fcdbb0dff1b
@@ -62,11 +62,15 @@ CODE:
PREINIT:
PurplePluginProtocolInfo *prpl_info;
CODE:
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
- if (prpl_info && prpl_info->send_raw != NULL) {
- RETVAL = prpl_info->send_raw(gc, str, strlen(str));
- } else {
+ if (!gc)
RETVAL = 0;
+ else {
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ if (prpl_info && prpl_info->send_raw != NULL) {
+ RETVAL = prpl_info->send_raw(gc, str, strlen(str));
+ } else {
+ RETVAL = 0;
+ }
}
OUTPUT:
RETVAL
More information about the Commits
mailing list