[gtk+/wip/gbsneto/other-locations] placesview: fix bookmark file not saved
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gbsneto/other-locations] placesview: fix bookmark file not saved
- Date: Tue, 30 Jun 2015 13:34:27 +0000 (UTC)
commit 06e3395bbcd6052b34f4a18745d44a3711433632
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jun 30 10:30:35 2015 -0300
placesview: fix bookmark file not saved
The bookmark file was getting NULLed out unnecessarily.
Fix it by better checking which error was emited.
gtk/gtkplacesview.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index ff4c393..c1eee3f 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -124,15 +124,14 @@ server_list_load (void)
if (error != NULL)
{
- if (! g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+ if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
{
/* only warn if the file exists */
g_warning ("Unable to open server bookmarks: %s", error->message);
+ g_clear_pointer (&bookmarks, g_bookmark_file_free);
}
g_error_free (error);
- g_bookmark_file_free (bookmarks);
- bookmarks = NULL;
}
g_free (datadir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]