[gtk/wip/otte/listview] list view: Be more careful with selection
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/listview] list view: Be more careful with selection
- Date: Sat, 5 Jan 2019 19:39:38 +0000 (UTC)
commit 9e2250e35d44b3e180dc6bf4a1b75b62d07277cc
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 5 14:38:20 2019 -0500
list view: Be more careful with selection
I've seen crashes in the font chooser with
the selection-changed signal getting emitted
early, and row being NULL.
gtk/gtklistview.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index a07cdcf14a..c840e84fb7 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -1049,6 +1049,9 @@ gtk_list_view_model_selection_changed_cb (GListModel *model,
row = gtk_list_view_get_row (self, position, &offset);
+ if (row == NULL)
+ return;
+
if (offset)
{
position += row->n_rows - offset;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]