diff libpurple/protocols/oscar/clientlogin.c @ 29700:519905ba5f75

oscar: Fix a clientLogin error crash (null printf bug). Closes #11662
author Paul Aurich <paul@darkrain42.org>
date Sat, 10 Apr 2010 22:48:48 +0000
parents fa8a25b46252
children 3fbae92e7e0b
line wrap: on
line diff
--- a/libpurple/protocols/oscar/clientlogin.c	Sat Apr 10 21:28:45 2010 +0000
+++ b/libpurple/protocols/oscar/clientlogin.c	Sat Apr 10 22:48:48 2010 +0000
@@ -515,8 +515,12 @@
 
 	if (error_message != NULL || len == 0) {
 		gchar *tmp;
-		tmp = g_strdup_printf(_("Error requesting %s: %s"),
-				URL_CLIENT_LOGIN, error_message);
+		if (error_message != NULL)
+			tmp = g_strdup_printf(_("Error requesting %s: %s"),
+					URL_CLIENT_LOGIN, error_message);
+		else
+			tmp = g_strdup_printf(_("Error requesting %s"),
+					URL_CLIENT_LOGIN);
 		purple_connection_error_reason(gc,
 				PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp);
 		g_free(tmp);