[recipes] Avoid a crash at shutdown with search tag
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Avoid a crash at shutdown with search tag
- Date: Sun, 1 Jan 2017 16:06:06 +0000 (UTC)
commit 743915789e9a4be75b636605cda138ba1800d4df
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 31 16:00:31 2016 -0500
Avoid a crash at shutdown with search tag
Search tags are inserted into the entry across the widget hierarchy.
We need to use weak pointers to prevent this from crashing when the
entry is finalized before the popover containing the various tagging
rows.
src/gr-diet-row.c | 1 +
src/gr-ingredient-row.c | 1 +
src/gr-meal-row.c | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-diet-row.c b/src/gr-diet-row.c
index c24b6c8..c7328b2 100644
--- a/src/gr-diet-row.c
+++ b/src/gr-diet-row.c
@@ -230,6 +230,7 @@ gr_diet_row_set_entry (GrDietRow *row,
GdTaggedEntry *entry)
{
row->entry = entry;
+ g_object_add_weak_pointer (G_OBJECT (entry), (gpointer *)&row->entry);
update_tag (row);
}
diff --git a/src/gr-ingredient-row.c b/src/gr-ingredient-row.c
index 3793af7..439df31 100644
--- a/src/gr-ingredient-row.c
+++ b/src/gr-ingredient-row.c
@@ -240,6 +240,7 @@ gr_ingredient_row_set_entry (GrIngredientRow *row,
GdTaggedEntry *entry)
{
row->entry = entry;
+ g_object_add_weak_pointer (G_OBJECT (entry), (gpointer *)&row->entry);
update_tag (row);
}
diff --git a/src/gr-meal-row.c b/src/gr-meal-row.c
index 59a0e73..d587535 100644
--- a/src/gr-meal-row.c
+++ b/src/gr-meal-row.c
@@ -240,6 +240,7 @@ gr_meal_row_set_entry (GrMealRow *row,
GdTaggedEntry *entry)
{
row->entry = entry;
+ g_object_add_weak_pointer (G_OBJECT (entry), (gpointer *)&row->entry);
update_tag (row);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]