refactor: Make Launching the editor more robust

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
Michael Vetter
2026-04-03 08:39:59 +02:00
parent a643fd87cc
commit 35bf9df0a9

View File

@@ -128,7 +128,9 @@ launch_editor(gchar* initial_content, void (*callback)(gchar* content, void* dat
return TRUE;
} else if (pid == 0) {
// Child process: Inherits TTY from parent
execvp(editor_argv[0], editor_argv);
if (editor_argv && editor_argv[0]) {
execvp(editor_argv[0], editor_argv);
}
_exit(EXIT_FAILURE);
}