summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Misc.cpp')
-rw-r--r--Source/Core/Common/Misc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/Misc.cpp b/Source/Core/Common/Misc.cpp
index 3a8454a36e..f831479845 100644
--- a/Source/Core/Common/Misc.cpp
+++ b/Source/Core/Common/Misc.cpp
@@ -30,7 +30,8 @@ const char* GetLastErrorMsg()
static __thread char err_str[buff_size] = {};
// Thread safe (XSI-compliant)
- strerror_r(errno, err_str, buff_size);
+ if (strerror_r(errno, err_str, buff_size))
+ return nullptr;
#endif
return err_str;