Fix DestroyPlatformWindow crashing when called in Shutdown of the application
This commit is contained in:
@@ -31,12 +31,14 @@ namespace Juliet
|
||||
{
|
||||
Log(LogLevel::Message, LogCategory::Editor, "Shutdown Editor Application...");
|
||||
|
||||
// DestroyOSWindow(MainWindow);
|
||||
if (MainWindow )
|
||||
{
|
||||
DestroyPlatformWindow(MainWindow);
|
||||
}
|
||||
}
|
||||
|
||||
void Win32EditorApplication::Update()
|
||||
{
|
||||
// UpdateOSWindowState(MainWindow);
|
||||
SystemEvent evt;
|
||||
while (GetEvent(evt))
|
||||
{
|
||||
@@ -47,20 +49,6 @@ namespace Juliet
|
||||
Running = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (evt.Type == EventType::Key_Down)
|
||||
{
|
||||
if (evt.Data.Keyboard.Key.ScanCode == ScanCode::Escape)
|
||||
{
|
||||
Running = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Other way to do it
|
||||
if (IsKeyDown(ScanCode::Q))
|
||||
{
|
||||
Running = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user