From 76d5ab8b9a4dfff75554753b9c11d997bdc7527e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Fri, 19 Feb 2021 11:37:45 +0100 Subject: [PATCH] Restore needed null check in OS_Unix::execute() --- drivers/unix/os_unix.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index ac233889028..44ce14b32de 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -298,9 +298,13 @@ Error OS_Unix::execute(const String &p_path, const List &p_arguments, bo while (fgets(buf, 65535, f)) { - p_pipe_mutex->lock(); + if (p_pipe_mutex) { + p_pipe_mutex->lock(); + } (*r_pipe) += String::utf8(buf); - p_pipe_mutex->unlock(); + if (p_pipe_mutex) { + p_pipe_mutex->unlock(); + } } int rv = pclose(f); if (r_exitcode)