diff src/plugins.c @ 1712:560b3117aedf

[gaim-migrate @ 1722] fix for segfault causer on solaris committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 13 Apr 2001 17:47:06 +0000
parents f42ce672c560
children c39cc2b44226
line wrap: on
line diff
--- a/src/plugins.c	Fri Apr 13 17:35:34 2001 +0000
+++ b/src/plugins.c	Fri Apr 13 17:47:06 2001 +0000
@@ -767,11 +767,14 @@
 		break;
 	case event_im_recv:
 		g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s",
-			   ((struct gaim_connection *)arg1)->username, *(char **)arg2, *(char **)arg3);
+			   ((struct gaim_connection *)arg1)->username,
+			   *(char **)arg2 ? *(char **)arg2 : "(null)",
+			   *(char **)arg3 ? *(char **)arg3 : "(null)");
 		break;
 	case event_im_send:
 		g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s",
-			   ((struct gaim_connection *)arg1)->username, (char *)arg2, *(char **)arg3);
+			   ((struct gaim_connection *)arg1)->username, (char *)arg2,
+			   *(char **)arg3 ? *(char **)arg3 : "(null)");
 		break;
 	case event_buddy_signon:
 		g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2);
@@ -815,7 +818,8 @@
 			   (char *)arg4);
 		break;
 	case event_chat_send:
-		g_snprintf(buf, sizeof buf, "\"%s\" %s", (char *)arg2, *(char **)arg3);
+		g_snprintf(buf, sizeof buf, "\"%s\" %s", (char *)arg2,
+				*(char **)arg3 ? *(char **)arg3 : "(null)");
 		break;
 	case event_warned:
 		g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %d",