Don't use first_action without initializing it if n_entries is 0.

Fri Dec 26 23:24:35 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
	Don't use first_action without initializing it if n_entries is 0.
This commit is contained in:
Matthias Clasen 2003-12-26 22:23:50 +00:00 committed by Matthias Clasen
parent 11198a1d92
commit a64ce01213
6 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri Dec 26 23:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Don't use first_action without initializing it if n_entries is 0.
Thu Dec 25 00:26:34 2003 Matthias Clasen <maclas@gmx.de>
* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):

View File

@ -1,3 +1,8 @@
Fri Dec 26 23:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Don't use first_action without initializing it if n_entries is 0.
Thu Dec 25 00:26:34 2003 Matthias Clasen <maclas@gmx.de>
* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):

View File

@ -1,3 +1,8 @@
Fri Dec 26 23:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Don't use first_action without initializing it if n_entries is 0.
Thu Dec 25 00:26:34 2003 Matthias Clasen <maclas@gmx.de>
* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):

View File

@ -1,3 +1,8 @@
Fri Dec 26 23:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Don't use first_action without initializing it if n_entries is 0.
Thu Dec 25 00:26:34 2003 Matthias Clasen <maclas@gmx.de>
* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):

View File

@ -1,3 +1,8 @@
Fri Dec 26 23:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Don't use first_action without initializing it if n_entries is 0.
Thu Dec 25 00:26:34 2003 Matthias Clasen <maclas@gmx.de>
* gdk/x11/gdkcursor-x11.c (gdk_display_get_default_cursor_size):

View File

@ -630,7 +630,7 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group,
GtkTranslateFunc translate_func;
gpointer translate_data;
GSList *group = NULL;
GtkAction *first_action;
GtkAction *first_action = NULL;
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
@ -694,7 +694,7 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group,
g_object_unref (action);
}
if (on_change)
if (on_change && first_action)
g_signal_connect_data (first_action, "changed",
on_change, user_data,
(GClosureNotify)destroy, 0);