[gtk/maplistmodel-fun: 2/2] maplistmodel: Actually clear nodes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/maplistmodel-fun: 2/2] maplistmodel: Actually clear nodes
- Date: Fri, 15 Jul 2022 00:23:25 +0000 (UTC)
commit c6dbfc85e9b2a7ef38f2f517b8c84cb75603ef7a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 14 20:22:22 2022 -0400
maplistmodel: Actually clear nodes
When we drop our weak ref, we better reset the pointer too.
gtk/gtkmaplistmodel.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkmaplistmodel.c b/gtk/gtkmaplistmodel.c
index de4cd27dbe..3d7520500c 100644
--- a/gtk/gtkmaplistmodel.c
+++ b/gtk/gtkmaplistmodel.c
@@ -484,7 +484,10 @@ gtk_map_list_model_clear_node (gpointer _node)
MapNode *node = _node;
if (node->item)
- g_object_remove_weak_pointer (node->item, &node->item);
+ {
+ g_object_remove_weak_pointer (node->item, &node->item);
+ node->item = NULL;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]