Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 25538:27e6ab4ff554
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
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 26 Feb 2009 08:14:24 +0000 |
parents | 4278d13b5471 |
children | 7f552614ec8a 4b8c4870b13a |
comparison
equal
deleted
inserted
replaced
25537:fc615861c88c | 25538:27e6ab4ff554 |
---|---|
3110 | 3110 |
3111 /* Check if the friends were imported successfully. */ | 3111 /* Check if the friends were imported successfully. */ |
3112 body = msim_msg_get_dictionary(reply, "body"); | 3112 body = msim_msg_get_dictionary(reply, "body"); |
3113 g_return_if_fail(body != NULL); | 3113 g_return_if_fail(body != NULL); |
3114 completed = msim_msg_get_string(body, "Completed"); | 3114 completed = msim_msg_get_string(body, "Completed"); |
3115 g_return_if_fail(body != NULL); | |
3116 msim_msg_free(body); | 3115 msim_msg_free(body); |
3116 g_return_if_fail(completed != NULL); | |
3117 if (!g_str_equal(completed, "True")) | 3117 if (!g_str_equal(completed, "True")) |
3118 { | 3118 { |
3119 purple_debug_info("msim_import_friends_cb", | 3119 purple_debug_info("msim_import_friends_cb", |
3120 "failed to import friends: %s", completed); | 3120 "failed to import friends: %s", completed); |
3121 purple_notify_error(session->account, _("Add friends from MySpace.com"), | 3121 purple_notify_error(session->account, _("Add friends from MySpace.com"), |