pidgin: d7408522: cmdproc->data should never be null. Log...
markdoliner at pidgin.im
markdoliner at pidgin.im
Thu Nov 13 14:15:39 EST 2008
-----------------------------------------------------------------
Revision: d74085222c90ffa62b79ed27984dded8a8725c00
Ancestor: 311b4db51b575e1baa7f78d751ff926475edecc3
Author: markdoliner at pidgin.im
Date: 2008-11-13T09:19:17
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d74085222c90ffa62b79ed27984dded8a8725c00
Modified files:
libpurple/protocols/msn/slp.c
ChangeLog:
cmdproc->data should never be null. Log a warning message if it
is (this is the same type of message logged by g_return_if_fail,
right?)
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c 6210d9ca7dd04987fb5eb1a03f09e67c1852e240
+++ libpurple/protocols/msn/slp.c 655e7fb5c5804adc6c46050abce82988489c0f5b
@@ -758,17 +758,20 @@ msn_p2p_msg(MsnCmdProc *cmdproc, MsnMess
if (slplink->swboard == NULL)
{
- /* We will need this in order to change its flags. */
- slplink->swboard = (MsnSwitchBoard *)cmdproc->data;
- /* If swboard is NULL, something has probably gone wrong earlier on
- * I didn't want to do this, but MSN 7 is somehow causing us to crash
- * here, I couldn't reproduce it to debug more, and people are
- * reporting bugs. Hopefully this doesn't cause more crashes. Stu.
- */
- if (slplink->swboard != NULL)
+ if (cmdproc->data == NULL)
+ g_warning("msn_p2p_msg cmdproc->data was NULL\n");
+ else {
+ /*
+ * We will swboard in order to change its flags. If its
+ * NULL, something has probably gone wrong earlier on. I
+ * didn't want to do this, but MSN 7 is somehow causing us
+ * to crash here, I couldn't reproduce it to debug more,
+ * and people are reporting bugs. Hopefully this doesn't
+ * cause more crashes. Stu.
+ */
+ slplink->swboard = (MsnSwitchBoard *)cmdproc->data;
slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
- else
- purple_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n");
+ }
}
msn_slplink_process_msg(slplink, msg);
More information about the Commits
mailing list