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;