From b86fddca5840c4765754327d62bb29ff830322db Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 22 Jul 2021 13:27:36 +0200 Subject: get_crystfel_exe: Fix logic --- src/crystfel_gui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index dbf949cd..f05cf7c0 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -1341,10 +1341,10 @@ char *get_crystfel_exe(const char *program) "This is OK provided the executable " "path is set correctly.\n"); exe_path = strdup(program); + } else { + exe_path = g_file_get_path(exe); + g_object_unref(exe); } - - exe_path = g_file_get_path(exe); - g_object_unref(exe); g_object_unref(crystfel_path); return exe_path; -- cgit v1.2.3