[gtk+/gtk-3-20] flowbox: Fix get_child_at_index crash with an invalid index
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] flowbox: Fix get_child_at_index crash with an invalid index
- Date: Thu, 15 Dec 2016 09:39:46 +0000 (UTC)
commit b1524a8adeb02afa062b5a1c8013c6e3a2ff0d41
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Dec 2 16:38:05 2016 +0100
flowbox: Fix get_child_at_index crash with an invalid index
https://bugzilla.gnome.org/show_bug.cgi?id=775525
gtk/gtkflowbox.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index ecec916..49fdb15 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -4321,7 +4321,7 @@ gtk_flow_box_get_child_at_index (GtkFlowBox *box,
g_return_val_if_fail (GTK_IS_FLOW_BOX (box), NULL);
iter = g_sequence_get_iter_at_pos (BOX_PRIV (box)->children, idx);
- if (iter)
+ if (!g_sequence_iter_is_end (iter))
return g_sequence_get (iter);
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]