Fix DestroyPlatformWindow crashing when called in Shutdown of the application
This commit is contained in:
1 parent
14e49c163f
commit
5b4b6f2c52
2 files changed
+11
-17
No files matched your search
@@ -53,7 +53,10 @@ namespace Juliet
|
||||
}
|
||||
|
||||
// Destroy all Windows that are still alive
|
||||
DestroyPlatformWindow(CurrentDisplayDevice->MainWindow);
|
||||
if (CurrentDisplayDevice->MainWindow)
|
||||
{
|
||||
DestroyPlatformWindow(CurrentDisplayDevice->MainWindow);
|
||||
}
|
||||
|
||||
CurrentDisplayDevice->Shutdown(CurrentDisplayDevice);
|
||||
// Free anything that was freed by the shutdown and then free the display
|
||||
@@ -89,11 +92,14 @@ namespace Juliet
|
||||
|
||||
void DestroyPlatformWindow(NonNullPtr<Window> window)
|
||||
{
|
||||
Assert(CurrentDisplayDevice->MainWindow == window.Get());
|
||||
|
||||
HideWindow(window);
|
||||
|
||||
CurrentDisplayDevice->DestroyPlatformWindow(CurrentDisplayDevice, window);
|
||||
|
||||
Free(window.Get());
|
||||
CurrentDisplayDevice->MainWindow = nullptr;
|
||||
}
|
||||
|
||||
void ShowWindow(NonNullPtr<Window> window)
|
||||
|
||||
Reference in new issue
Block a user