[latexila] Projects: avoid critical messages



commit 0840e00fbdfd6d6a942df08a8987fd76dc5eaadc
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Sat Mar 10 21:29:40 2012 +0100

    Projects: avoid critical messages

 src/projects.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/projects.vala b/src/projects.vala
index f4feeb0..32512a6 100644
--- a/src/projects.vala
+++ b/src/projects.vala
@@ -105,7 +105,7 @@ public class Projects
         GLib.List<Document> docs = Latexila.get_default ().get_documents ();
         foreach (Document doc in docs)
         {
-            if (doc.project_id != -1)
+            if (doc.project_id != -1 || doc.location == null)
                 continue;
 
             if (doc.location.has_prefix (new_project.directory))
@@ -177,6 +177,9 @@ public class Projects
         {
             doc.project_id = -1;
 
+            if (doc.location == null)
+                continue;
+
             for (int i = 0 ; i < projects.size ; i++)
             {
                 if (doc.location.has_prefix (projects[i].directory))



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