diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index 0b09516b759..10491d9c458 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -1435,6 +1435,9 @@ static String UnameHelper(char type) FILE *fp = popen(cmd, "r"); + if (!fp) + return "Unknown"; + char line[1024]; std::ostringstream msgbuf; @@ -1892,4 +1895,4 @@ String Utility::GetIcingaDataPath(void) return String(path) + "\\icinga2"; } -#endif /* _WIN32 */ \ No newline at end of file +#endif /* _WIN32 */