From b60024b9c8721b98e449e00bb7eea19598c7d585 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Apr 2019 12:05:24 +0200 Subject: [PATCH] - fixed: The WideString conversion function was missing a null check. --- src/utility/zstring.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utility/zstring.cpp b/src/utility/zstring.cpp index f3bdbd567..6bcf36c7f 100644 --- a/src/utility/zstring.cpp +++ b/src/utility/zstring.cpp @@ -1314,6 +1314,7 @@ FString &FString::operator=(const wchar_t *copyStr) std::wstring WideString(const char *cin) { + if (!cin) return L""; const uint8_t *in = (const uint8_t*)cin; // This is a bit tricky because we need to support both UTF-8 and legacy content in ISO-8859-1 // and thanks to user-side string manipulation it can be that a text mixes both.