Add null check

This commit is contained in:
Ryan Conrad 2022-04-13 18:58:26 -05:00
commit a1ab42e59f

View file

@ -293,6 +293,9 @@ namespace Ship {
void Window::ReadText(const char textToRead[]) void Window::ReadText(const char textToRead[])
{ {
if (textToRead == nullptr) {
return;
}
std::string textCopy(textToRead); std::string textCopy(textToRead);
std::thread t1(task1, textCopy); std::thread t1(task1, textCopy);
t1.detach(); t1.detach();