aboutsummaryrefslogtreecommitdiff
path: root/src/window
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-09-04 01:22:49 +0200
committerdec05eba <dec05eba@protonmail.com>2022-09-04 01:22:49 +0200
commit64f9697f09fe806415ce5c8c5074ce022fefd0af (patch)
treeba250b828e37bb852b5d83e83e580d15747ab489 /src/window
parent550119dcfca055a0a09435ee71926d86bab455c0 (diff)
Only deinit window if it has been created
Diffstat (limited to 'src/window')
-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) {