[gnome-control-center] search: Fix crash introduced in 58a6432
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] search: Fix crash introduced in 58a6432
- Date: Thu, 31 May 2018 00:17:02 +0000 (UTC)
commit 59e420b7747d8c273f3e93f6c3b915d6f415a789
Author: Robert Ancell <robert ancell canonical com>
Date: Thu May 31 12:16:04 2018 +1200
search: Fix crash introduced in 58a6432
panels/search/cc-search-locations-dialog.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index 2959e3b0f..820de2bc7 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -304,7 +304,10 @@ get_places_list (void)
g_autoptr(Place) p = l->data;
old_place = g_hash_table_lookup (places, p->location);
if (old_place == NULL)
- g_hash_table_insert (places, p->location, g_steal_pointer (&p));
+ {
+ g_hash_table_insert (places, p->location, p);
+ g_steal_pointer (&p);
+ }
}
/* finally, load bookmarks, and possibly update attributes */
@@ -315,7 +318,8 @@ get_places_list (void)
old_place = g_hash_table_lookup (places, p->location);
if (old_place == NULL)
{
- g_hash_table_insert (places, p->location, g_steal_pointer (&p));
+ g_hash_table_insert (places, p->location, p);
+ g_steal_pointer (&p);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]