From a1ab42e59fe20923e365e8a9ad2b9892e3c08dfb Mon Sep 17 00:00:00 2001 From: Ryan Conrad Date: Wed, 13 Apr 2022 18:58:26 -0500 Subject: [PATCH] Add null check --- libultraship/libultraship/Window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libultraship/libultraship/Window.cpp b/libultraship/libultraship/Window.cpp index d929b5ea3..d17ec049a 100644 --- a/libultraship/libultraship/Window.cpp +++ b/libultraship/libultraship/Window.cpp @@ -293,6 +293,9 @@ namespace Ship { void Window::ReadText(const char textToRead[]) { + if (textToRead == nullptr) { + return; + } std::string textCopy(textToRead); std::thread t1(task1, textCopy); t1.detach();