# HG changeset patch # User Mark Doliner # Date 1290419694 0 # Node ID 6f9a43a2b716772e342e58fac0bbc1c4a0cf8bda # Parent a76cf8ecb0c538de8170a94d3dc6bb0f801f0ff4 I noticed a NULL printf crash from the first chunk of this change. In the second chunk I changed the code to match the error message from the first chunk. I prefer this message. diff -r a76cf8ecb0c5 -r 6f9a43a2b716 libpurple/protocols/oscar/clientlogin.c --- a/libpurple/protocols/oscar/clientlogin.c Mon Nov 22 09:16:49 2010 +0000 +++ b/libpurple/protocols/oscar/clientlogin.c Mon Nov 22 09:54:54 2010 +0000 @@ -335,7 +335,8 @@ /* Note to translators: The first %s is a URL, the second is an error message. */ tmp = g_strdup_printf(_("Error requesting %s: %s"), - get_start_oscar_session_url(od), error_message); + get_start_oscar_session_url(od), error_message ? + error_message : _("The server returned an empty response")); purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp); @@ -568,12 +569,9 @@ if (error_message != NULL || len == 0) { gchar *tmp; - if (error_message != NULL) - tmp = g_strdup_printf(_("Error requesting %s: %s"), - get_client_login_url(od), error_message); - else - tmp = g_strdup_printf(_("Error requesting %s"), - get_client_login_url(od)); + tmp = g_strdup_printf(_("Error requesting %s: %s"), + get_client_login_url(od), error_message ? + error_message : _("The server returned an empty response")); purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp); g_free(tmp);