[gtk+] GtkListBoxRow: add g_return_if_fail to grab_focus, don't crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkListBoxRow: add g_return_if_fail to grab_focus, don't crash
- Date: Fri, 27 Feb 2015 11:31:16 +0000 (UTC)
commit 3ce3593ebf334f0bee2497732ebce8958e9950e0
Author: Rafal Luzynski <digitalfreak lingonborough com>
Date: Thu Feb 26 02:15:18 2015 +0100
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
gtk/gtklistbox.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 06ccaee..b270910 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]