changeset 30111: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 8474495b9dfc
children b4cd989f524f
files libpurple/protocols/oscar/clientlogin.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
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);