diff --git a/src/xenia/ui/window.cc b/src/xenia/ui/window.cc index c1f6277ed..43db896d8 100644 --- a/src/xenia/ui/window.cc +++ b/src/xenia/ui/window.cc @@ -157,6 +157,10 @@ void Window::OnClose() { } void Window::OnDestroy() { + if (!context_) { + return; + } + if (--elemental_initialization_count_ == 0) { el::Shutdown(); }