changeset 122:521db4bf5f28

[gaim-migrate @ 132] Fixed bug where if you erase your user info it segfaults. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 16 Apr 2000 00:57:38 +0000
parents 3571b593f423
children f7a5f376f54e
files src/dialogs.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Sat Apr 15 23:52:33 2000 +0000
+++ b/src/dialogs.c	Sun Apr 16 00:57:38 2000 +0000
@@ -898,6 +898,10 @@
 	save_prefs();
 
         buf = g_malloc(strlen(current_user->user_info) * 4);
+	if (!buf) {
+		buf = g_malloc(1);
+		buf[0] = 0;
+	}
         g_snprintf(buf, strlen(current_user->user_info) * 2, "%s", current_user->user_info);
         escape_text(buf);
         serv_set_info(buf);