[anjuta/newproject] Fix a crash on autotool project (having node with a NULL file)



commit ff8f27261dcaf78cd3d0e25ee1bf71d67a131783
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Wed May 5 22:35:14 2010 +0200

    Fix a crash on autotool project (having node with a NULL file)

 libanjuta/anjuta-project.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libanjuta/anjuta-project.c b/libanjuta/anjuta-project.c
index b891903..b74a6b3 100644
--- a/libanjuta/anjuta-project.c
+++ b/libanjuta/anjuta-project.c
@@ -794,7 +794,7 @@ anjuta_project_proxy_new (AnjutaProjectNode *node)
 		proxy->reference = 1;
 		proxy->node = node;
 		proxy->base.type = data->type | ANJUTA_PROJECT_PROXY;
-		proxy->base.file = g_object_ref (data->file);
+		proxy->base.file = data->file != NULL ? g_object_ref (data->file) : NULL;
 		proxy->base.name = g_strdup (data->name);
 		
 		/* Shallow copy of all properties */



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