comparison src/gtkdialogs.c @ 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 65d3140f35fd
children 8d2007d738d5
comparison
equal deleted inserted replaced
10876:4fdc8a1102c0 10877:99c1fb67b7bb
1030 } 1030 }
1031 1031
1032 void 1032 void
1033 gaim_gtkdialogs_remove_chat(GaimChat *chat) 1033 gaim_gtkdialogs_remove_chat(GaimChat *chat)
1034 { 1034 {
1035 const gchar *name = gaim_chat_get_name(chat); 1035 const gchar *name;
1036 gchar *text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"), name); 1036 gchar *text;
1037 1037
1038 g_return_if_fail(chat != NULL); 1038 g_return_if_fail(chat != NULL);
1039
1040 name = gaim_chat_get_name(chat);
1041 text = g_strdup_printf(_("You are about to remove the chat %s from your buddy list. Do you want to continue?"),
1042 name ? name : "");
1039 1043
1040 gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, 1044 gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2,
1041 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), 1045 _("Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb),
1042 _("Cancel"), NULL); 1046 _("Cancel"), NULL);
1043 1047