diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-09-04 01:22:49 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-09-04 01:22:49 +0200 |
commit | 64f9697f09fe806415ce5c8c5074ce022fefd0af (patch) | |
tree | ba250b828e37bb852b5d83e83e580d15747ab489 | |
parent | 550119dcfca055a0a09435ee71926d86bab455c0 (diff) |
Only deinit window if it has been created
-rw-r--r-- | src/window/Window.cpp | 3 |
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) { |