Skip to content

Commit 3154dfd

Browse files
committed
Fix check for TERMUX_EXPORT_FD env var .. again
Was accidentally removed in revert in previous commit.
1 parent 895b0c3 commit 3154dfd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

termux-api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ _Noreturn void exec_callback(int fd)
7979

8080
char errmsg[256];
8181
char *export_to_env = getenv("TERMUX_EXPORT_FD");
82-
if (strncmp(export_to_env, "true", 4) == 0) {
82+
if (export_to_env && strncmp(export_to_env, "true", 4) == 0) {
8383
if (setenv("TERMUX_USB_FD", fds, true) == -1)
8484
perror("setenv");
8585
execl(PREFIX "/libexec/termux-callback", "termux-callback", NULL);

0 commit comments

Comments
 (0)