Skip to content

Commit e3c3358

Browse files
jenshannoschwalmTurboGit
authored andcommitted
Avoid crash in dt_database_show_error()
This later calls dt_gui_show_standalone_yes_no_dialog() but should only be called if we are running in gui mode. Fixes #18822
1 parent d8c0603 commit e3c3358

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/darktable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load
15771577
if(connection) g_object_unref(connection);
15781578
}
15791579
darktable_splash_screen_destroy(); // dismiss splash screen before potentially showing error dialog
1580-
if(!image_loaded_elsewhere) dt_database_show_error(darktable.db);
1580+
if(!image_loaded_elsewhere && init_gui) dt_database_show_error(darktable.db);
15811581

15821582
dt_print(DT_DEBUG_ALWAYS, "ERROR: can't acquire database lock, aborting.");
15831583
return 1;

0 commit comments

Comments
 (0)