[easytag] Avoid unreffing a NULL GFileInfo in the browser
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Avoid unreffing a NULL GFileInfo in the browser
- Date: Thu, 16 Jan 2014 22:01:58 +0000 (UTC)
commit 192aa2201320bcc2d7b5bcf64fa3a015c21478b3
Author: David King <amigadave amigadave com>
Date: Thu Jan 16 21:30:36 2014 +0000
Avoid unreffing a NULL GFileInfo in the browser
src/browser.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 28783ff..45e3678 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -3000,17 +3000,19 @@ static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePa
g_free (path);
fileinfo = g_file_query_info (file, G_FILE_ATTRIBUTE_ACCESS_CAN_READ,
G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ g_object_unref (file);
- if (fileinfo
- && !g_file_info_get_attribute_boolean (fileinfo,
- G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
+ if (fileinfo)
{
- g_object_unref (file);
+ if (!g_file_info_get_attribute_boolean (fileinfo,
+ G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
+ {
+ g_object_unref (fileinfo);
+ return;
+ }
+
g_object_unref (fileinfo);
- return;
}
- g_object_unref (file);
- g_object_unref (fileinfo);
gtk_tree_model_iter_children(GTK_TREE_MODEL(directoryTreeModel),
&subNodeIter, iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]