# HG changeset patch # User Daniel Atallah # Date 1114557782 0 # Node ID 99c1fb67b7bba71663895f50acd366bc9ed032c3 # Parent 4fdc8a1102c03cde7a34f81061af1f79890f43ed [gaim-migrate @ 12569] The g_return_if_fail() check was too late, also don't potentially sprintf(NULL) committer: Tailor Script diff -r 4fdc8a1102c0 -r 99c1fb67b7bb src/gtkdialogs.c --- a/src/gtkdialogs.c Tue Apr 26 22:27:49 2005 +0000 +++ b/src/gtkdialogs.c Tue Apr 26 23:23:02 2005 +0000 @@ -1032,11 +1032,15 @@ void gaim_gtkdialogs_remove_chat(GaimChat *chat) { - const gchar *name = gaim_chat_get_name(chat); - gchar *text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), name); + const gchar *name; + gchar *text; g_return_if_fail(chat != NULL); + name = gaim_chat_get_name(chat); + text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), + name ? name : ""); + gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), _("Cancel"), NULL);