[gtk+] 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+] flowbox: Fix get_child_at_index crash with an invalid index
- Date: Fri, 2 Dec 2016 18:18:18 +0000 (UTC)
commit 1f7b03bb2b11038deffe54b57f14eedc6d90f575
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 38a528b..66535af 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -4272,7 +4272,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]