mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
GtkListBoxRow: add g_return_if_fail to grab_focus, don't crash
Although gtk_list_box_row_grab_focus() is not a public function it can be easily called by gtk_widget_grab_focus() with a row argument which has been removed from the list box and has box == NULL. https://bugzilla.gnome.org/show_bug.cgi?id=744879
This commit is contained in:
parent
45210d5835
commit
3ce3593ebf
@ -3487,6 +3487,8 @@ gtk_list_box_row_grab_focus (GtkWidget *widget)
|
||||
GtkListBoxRow *row = GTK_LIST_BOX_ROW (widget);
|
||||
GtkListBox *box = gtk_list_box_row_get_box (row);
|
||||
|
||||
g_return_if_fail (box != NULL);
|
||||
|
||||
if (BOX_PRIV (box)->cursor_row != row)
|
||||
gtk_list_box_update_cursor (box, row, FALSE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user