[glib] [gschema-compile] fix segfault



commit 015df7e369cf37929acfebec0a705d5531ac355a
Author: Owen Taylor <otaylor fishsoup net>
Date:   Wed Jul 28 15:15:57 2010 -0400

    [gschema-compile] fix segfault
    
    If files are passed on the command line and we don't set override_files
    at all, don't try to read from the array.

 gio/gschema-compile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gschema-compile.c b/gio/gschema-compile.c
index aa940d8..877e213 100644
--- a/gio/gschema-compile.c
+++ b/gio/gschema-compile.c
@@ -1864,7 +1864,7 @@ main (int argc, char **argv)
 
 
   if (!(table = parse_gschema_files (schema_files, &error)) ||
-      !set_overrides (table, override_files, &error) ||
+      (override_files != NULL && !set_overrides (table, override_files, &error)) ||
       (!dry_run && !write_to_file (table, target, &error)))
     {
       fprintf (stderr, "%s\n", error->message);



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