Fix crash when relative mode was left active on removed window
This commit is contained in:
@@ -231,6 +231,9 @@ SDLWindow::~SDLWindow()
|
||||
|
||||
if (_window == nullptr)
|
||||
return;
|
||||
|
||||
if (Input::Mouse != nullptr && Input::Mouse->IsRelative(this))
|
||||
Input::Mouse->SetRelativeMode(false, this);
|
||||
|
||||
SDL_StopTextInput(_window);
|
||||
SDL_DestroyWindow(_window);
|
||||
|
||||
Reference in New Issue
Block a user