aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/window/Window.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window/Window.cpp b/src/window/Window.cpp
index dbb77a3..5174504 100644
--- a/src/window/Window.cpp
+++ b/src/window/Window.cpp
@@ -15,7 +15,8 @@ namespace mgl {
}
Window::~Window() {
- mgl_window_deinit(&window);
+ if(window.window)
+ mgl_window_deinit(&window);
}
bool Window::create(const char *title, CreateParams create_params) {