Mercurial > pidgin
comparison src/gtkrequest.c @ 10980:842a21e7480b
[gaim-migrate @ 12810]
When no callback is specified for the action, don't try to call it.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 08 Jun 2005 06:28:47 +0000 |
parents | aa1df43e474c |
children | 8d2007d738d5 |
comparison
equal
deleted
inserted
replaced
10979:fa71e39f7e3a | 10980:842a21e7480b |
---|---|
138 static void | 138 static void |
139 choice_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data) | 139 choice_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data) |
140 { | 140 { |
141 GtkWidget *radio = g_object_get_data(G_OBJECT(dialog), "radio"); | 141 GtkWidget *radio = g_object_get_data(G_OBJECT(dialog), "radio"); |
142 GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); | 142 GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); |
143 if (id < data->cb_count) | 143 if (id < data->cb_count && data->cbs[id] != NULL) |
144 while (group) { | 144 while (group) { |
145 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group->data))) { | 145 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group->data))) { |
146 ((GaimRequestChoiceCb)data->cbs[id])(data->user_data, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(group->data), "choice_id"))); | 146 ((GaimRequestChoiceCb)data->cbs[id])(data->user_data, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(group->data), "choice_id"))); |
147 break; | 147 break; |
148 } | 148 } |