From 02c08c0c6c82e0d328a4c802ac0b83793725371a Mon Sep 17 00:00:00 2001 From: Hanno Schwalm Date: Sun, 25 Aug 2024 21:20:54 +0200 Subject: [PATCH] Fix report of darktable command line Due to handling of argc/argv in callers of dt_init() we can only use g_strdupv() if called from main darktable; check this via init_gui for safety. --- src/common/darktable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/darktable.c b/src/common/darktable.c index 25414f8ac71a..06f9db59b949 100644 --- a/src/common/darktable.c +++ b/src/common/darktable.c @@ -894,7 +894,7 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load GSList *config_override = NULL; // keep a copy of argv array for possibly reporting later - gchar **myoptions = argc > 1 ? g_strdupv(argv) : NULL; + gchar **myoptions = init_gui && argc > 1 ? g_strdupv(argv) : NULL; for(int k = 1; k < argc; k++) {