Mercurial > pidgin
changeset 10877:99c1fb67b7bb
[gaim-migrate @ 12569]
The g_return_if_fail() check was too late, also don't potentially sprintf(NULL)
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 26 Apr 2005 23:23:02 +0000 |
parents | 4fdc8a1102c0 |
children | da36acb8442c |
files | src/gtkdialogs.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);