[gnome-builder] check for file_info first



commit 7f8de1f4ddb3411148aef6b880c9be52e2df63ac
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]