[gegl] bin: fix crash due to NULL deref in thumbnailer



commit b477fd8ba4a6b7b788479ff7d9524b2d7d582de5
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Jul 16 12:20:45 2019 +0200

    bin: fix crash due to NULL deref in thumbnailer

 bin/ui-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/bin/ui-core.c b/bin/ui-core.c
index 01b14a936..3a289e83e 100644
--- a/bin/ui-core.c
+++ b/bin/ui-core.c
@@ -43,7 +43,7 @@ const char *css =
 "dl.bindings   { font-size: 1.8vh; color:white; position:absolute;left:1em;top:60%;background-color: 
rgba(0,0,0,0.7); width: 100%; height: 40%; padding-left: 1em; padding-top:1em;}\n"
 "dt.binding   { color:white; }\n"
 
-"div.graph, div.properties, div.scrollback{ font-size: 2.0vh; }\n"
+"div.graph, div.properties, div.scrollback{ font-size: 1.8vh; }\n"
 "div.commandline-shell { font-size: 4.0vh; }\n"
 
 "div.graph {position:absolute; top: 0; left: 0; color:white; }\n"
@@ -1577,7 +1577,6 @@ int thumbgen_main (int argc, char **argv)
 
   o = global_state = ge_state_new ();
 
-
   for (char **arg = &argv[2]; *arg; arg++)
   {
     if (o->path)
@@ -1585,7 +1584,8 @@ int thumbgen_main (int argc, char **argv)
     o->path = g_strdup (*arg);
     ui_load_path (o);
 
-    if (!strcmp (gegl_node_get_operation (o->source), "gegl:pdf-load"))
+    if (o->source &&
+        !strcmp (gegl_node_get_operation (o->source), "gegl:pdf-load"))
         gegl_node_set (o->source, "ppi", 72/2.0, NULL);
     argvs_eval ("thumb");
   }


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