[gnome-builder/wip/libide-merge] check for file_info first



commit 160f964f5c4c527c2dba6852ed0c73cdfa0c048c
Author: Christian Hergert <christian hergert me>
Date:   Sun Mar 22 19:59:08 2015 -0700

    check for file_info first

 libide/ide-buffer-manager.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-buffer-manager.c b/libide/ide-buffer-manager.c
index f5994c9..6e109c7 100644
--- a/libide/ide-buffer-manager.c
+++ b/libide/ide-buffer-manager.c
@@ -545,7 +545,7 @@ ide_buffer_manager__load_file_query_info_cb (GObject      *object,
       IDE_EXIT;
     }
 
-  if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
+  if (file_info && g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
     {
       gboolean read_only;
 
@@ -554,7 +554,7 @@ ide_buffer_manager__load_file_query_info_cb (GObject      *object,
       _ide_buffer_set_read_only (state->buffer, read_only);
     }
 
-  if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
+  if (file_info && g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
     {
       GTimeVal tv;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]