summaryrefslogtreecommitdiffstats
path: root/drivers/unix/os_unix.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-09-15 19:48:18 +0200
committerYuri Sizov <yuris@humnom.net>2023-09-15 19:48:18 +0200
commit48e1c19deaadac57172b8d3e3cf13cd53a1c8341 (patch)
tree55035b87d5c563e3a23330bbaa08408b41dbbad7 /drivers/unix/os_unix.cpp
parentdf6cd37a697fcc2f63940d7984726661069c18b6 (diff)
parent3565d1bf7ebd2e36556736479cb8ba9523d70a63 (diff)
downloadredot-engine-48e1c19deaadac57172b8d3e3cf13cd53a1c8341.tar.gz
Merge pull request #81583 from AThousandShips/null_check_drivers_platform
[Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r--drivers/unix/os_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 1ffacdf98d..4d9549c5a6 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -495,7 +495,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, St
}
FILE *f = popen(command.utf8().get_data(), "r");
- ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, "Cannot create pipe from command: " + command);
+ ERR_FAIL_NULL_V_MSG(f, ERR_CANT_OPEN, "Cannot create pipe from command: " + command + ".");
char buf[65535];
while (fgets(buf, 65535, f)) {
if (p_pipe_mutex) {
@@ -647,7 +647,7 @@ Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle
}
p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
- ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));
+ ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));
if (r_resolved_path != nullptr) {
*r_resolved_path = path;