changeset 1657:45800119e039

[gaim-migrate @ 1667] this should help avoid segfaults committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 28 Mar 2001 00:28:22 +0000
parents 8c1861a8daa1
children ea5b31cdd438
files plugins/yay/yay.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/yay/yay.c	Tue Mar 27 22:26:23 2001 +0000
+++ b/plugins/yay/yay.c	Wed Mar 28 00:28:22 2001 +0000
@@ -146,7 +146,10 @@
 	msg = va_arg(ap, char *);
 	va_end(ap);
 
-	e = tmp = g_strdup(msg);
+	if (msg)
+		e = tmp = g_strdup(msg);
+	else
+		return;
 
 	while ((c = strchr(e, '\033')) != NULL) {
 		*c++ = '\0';