[gegl] bin: avoid calling lua code when lua support is not available



commit 25a01cb384fb46327bccf9a17b7c69a9127383bb
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Mar 3 13:30:26 2019 +0100

    bin: avoid calling lua code when lua support is not available

 bin/ui-core.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/bin/ui-core.c b/bin/ui-core.c
index 70b1ffe66..f9ce4d91a 100644
--- a/bin/ui-core.c
+++ b/bin/ui-core.c
@@ -763,7 +763,7 @@ static gboolean renderer_task (gpointer data)
               G_SPAWN_SEARCH_PATH|G_SPAWN_SEARCH_PATH_FROM_ENVP,
               NULL, NULL, &thumbnailer_pid, &error);
           if (error)
-            g_warning (error->message);
+            g_warning ("%s", error->message);
         }
         g_usleep (1000);
       }
@@ -4830,6 +4830,7 @@ static void gegl_ui (Mrg *mrg, void *data)
 
   if (g_str_has_suffix (o->path, ".lui"))
   {
+#if HAVE_LUA
   int result;
   int status = luaL_loadfile(L, o->path);
   if (status)
@@ -4845,18 +4846,9 @@ static void gegl_ui (Mrg *mrg, void *data)
     {
     }
   }
+#endif
   }
 
-
-
-
-
-
-
-
-
-
-
 #if HAVE_LUA
   if (run_lua_file ("viewer.lua"))
   {


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