[gnome-builder] autotools: guard against NULL values



commit 512f4024bda3c3b48899836c71c669c6a253f277
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sun Feb 19 08:56:29 2017 +0530

    autotools: guard against NULL values
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771145

 plugins/autotools/ide-makecache.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/autotools/ide-makecache.c b/plugins/autotools/ide-makecache.c
index ca32361..d1b0a4c 100644
--- a/plugins/autotools/ide-makecache.c
+++ b/plugins/autotools/ide-makecache.c
@@ -1661,6 +1661,9 @@ ide_makecache_get_build_targets_worker (GTask        *task,
                 continue;
             }
 
+          if (g_hash_table_size (amdirs) < 1)
+            continue;
+
           names = g_strsplit (parts [1], " ", 0);
 
           for (guint i = 0; names [i]; i++)
@@ -1671,6 +1674,9 @@ ide_makecache_get_build_targets_worker (GTask        *task,
 
               installdir = find_install_dir (key, amdirs);
 
+              if (installdir == NULL)
+                continue;
+
               target = g_object_new (IDE_TYPE_AUTOTOOLS_BUILD_TARGET,
                                      "build-directory", makedir,
                                      "context", context,


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