pidgin: 0b5a9a19: This should fix a sporadic crash? The b...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Feb 26 03:15:44 EST 2009


-----------------------------------------------------------------
Revision: 0b5a9a19b155dbe2ae56ff02009fa6e9a354a55a
Ancestor: aa0c4c79c82ee967ae25bd40361b53dd60a84e2b
Author: markdoliner at pidgin.im
Date: 2009-02-26T08:14:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0b5a9a19b155dbe2ae56ff02009fa6e9a354a55a

Modified files:
        libpurple/protocols/myspace/myspace.c

ChangeLog: 

This should fix a sporadic crash?  The behavior before was clearly wrong--
there's no need to check that body != NULL twice.  This behavior should
be better... but this probably shouldn't be a g_return(), since we don't
control the data sent to us by the server it shouldn't be considered a
programming error if they fail to send us the "Completed" key

-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/myspace.c	61c5577c0063074b6a9ccc7b4b9527bf953c8dad
+++ libpurple/protocols/myspace/myspace.c	b686a7392be3abd9c253c6fc455decd6726b3067
@@ -3112,8 +3112,8 @@ msim_import_friends_cb(MsimSession *sess
 	body = msim_msg_get_dictionary(reply, "body");
 	g_return_if_fail(body != NULL);
 	completed = msim_msg_get_string(body, "Completed");
-	g_return_if_fail(body != NULL);
 	msim_msg_free(body);
+	g_return_if_fail(completed != NULL);
 	if (!g_str_equal(completed, "True"))
 	{
 		purple_debug_info("msim_import_friends_cb",


More information about the Commits mailing list