From 64f9697f09fe806415ce5c8c5074ce022fefd0af Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Sep 2022 01:22:49 +0200 Subject: Only deinit window if it has been created --- src/window/Window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/window/Window.cpp') 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) { -- cgit v1.2.3