# HG changeset patch # User Christian Hammond # Date 1056079962 0 # Node ID c304abc3e68bece50371e75b0f6b70a28eddda6d # Parent 1afd1ffd329a7aeff13611f79125ce0e6993df0f [gaim-migrate @ 6364] This should fix the bug where Set User Info would sometimes crash. It attempted to access a field in account, which on the old system was a static buffer, and would always have some kind of value, but in the new one, it could be NULL. Kaboom! committer: Tailor Script diff -r 1afd1ffd329a -r c304abc3e68b src/dialogs.c --- a/src/dialogs.c Fri Jun 20 01:57:55 2003 +0000 +++ b/src/dialogs.c Fri Jun 20 03:32:42 2003 +0000 @@ -2192,6 +2192,7 @@ GtkWidget *frame; gchar *buf; GaimAccount *account; + const char *user_info; struct set_info_dlg *b = g_new0(struct set_info_dlg, 1); account = gc->account; @@ -2222,11 +2223,15 @@ b->text = gtk_text_view_new(); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(b->text), GTK_WRAP_WORD_CHAR); gtk_widget_set_size_request(b->text, 300, 200); - buf = g_malloc(strlen(account->user_info) + 1); - strncpy_nohtml(buf, account->user_info, strlen(account->user_info) + 1); - buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(b->text)); - gtk_text_buffer_set_text(buffer, buf, -1); - g_free(buf); + + if ((user_info = gaim_account_get_user_info(account)) != NULL) { + buf = g_malloc(strlen(user_info) + 1); + strncpy_nohtml(buf, user_info, strlen(user_info) + 1); + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(b->text)); + gtk_text_buffer_set_text(buffer, buf, -1); + g_free(buf); + } + gtk_container_add(GTK_CONTAINER(frame), b->text); gtk_window_set_focus(GTK_WINDOW(b->window), b->text);