changeset 29037:f261b4978ae4

If Pidgin is running in Debug mode, on Windows, and no splash-screen is active then a segfault may occur.
author andrew.victor@mxit.com
date Tue, 24 Nov 2009 13:38:25 +0000
parents 06fabb28bc69
children cc391f752b05
files libpurple/protocols/mxit/splashscreen.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/mxit/splashscreen.c	Tue Nov 24 13:23:27 2009 +0000
+++ b/libpurple/protocols/mxit/splashscreen.c	Tue Nov 24 13:38:25 2009 +0000
@@ -43,10 +43,10 @@
 {
 	const char* splashId = purple_account_get_string(session->acc, MXIT_CONFIG_SPLASHID, NULL);
 
-	purple_debug_info(MXIT_PLUGIN_ID, "Current splashId: '%s'\n", splashId);
-
-	if ((splashId != NULL) && (*splashId != '\0'))
+	if ((splashId != NULL) && (*splashId != '\0')) {
+		purple_debug_info(MXIT_PLUGIN_ID, "Current splashId: '%s'\n", splashId);
 		return splashId;
+	}
 	else
 		return NULL;
 }
@@ -149,7 +149,7 @@
 
 	/* Get current splash ID */
 	splashId = splash_current(session);
-	if (!splashId)
+	if (splashId == NULL)		/* no splash-screen */
 		return;
 
 	/* if is clickable, then send click event */