GNOME Bugzilla – Bug 779317
gtk_pad_controllerpad_set_action issue with incorrect assert
Last modified: 2017-03-01 12:01:05 UTC
In the following function: >void >gtk_pad_controller_set_action (GtkPadController *controller, > GtkPadActionType type, > gint index, > gint mode, > const gchar *label, > const gchar *action_name); When setting a type with GTK_PAD_ACTION_STRIP, there is this error message : > Gtk-CRITICAL **: gtk_pad_controller_set_action: assertion 'type <= GTK_PAD_ACTION_RING' failed here is a patch : diff --git a/gtk/gtkpadcontroller.c b/gtk/gtkpadcontroller.c index c1a9af714e..e7fedfb527 100644 --- a/gtk/gtkpadcontroller.c +++ b/gtk/gtkpadcontroller.c @@ -514,7 +514,7 @@ gtk_pad_controller_set_action (GtkPadController *controller, (gchar *) label, (gchar *) action_name }; g_return_if_fail (GTK_IS_PAD_CONTROLLER (controller)); - g_return_if_fail (type <= GTK_PAD_ACTION_RING); + g_return_if_fail (type <= GTK_PAD_ACTION_STRIP); gtk_pad_controller_add_entry (controller, &entry); } Regards.
Thanks for spotting! The fix is correct, it'd be great if you could attach a git-format'ed patch so authorship is preserved.
Created attachment 346837 [details] [review] Fix check on in gtk_pad_controller_set_action done!
Thanks! The fix is now in gtk-3-22 and master branches.