From 2a4697c04f63af1084ae5bd31b5c6801150f7a36 Mon Sep 17 00:00:00 2001 From: Andy Vandijck Date: Sat, 5 Jul 2025 10:21:58 +0200 Subject: [PATCH] Fix warning Fix warning --- src/wx/panel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 7fdb890d..f2a90acf 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -2434,15 +2434,13 @@ void SDLDrawingPanel::DrawingPanelInit() } sdlwindow = SDL_CreateWindowWithProperties(props); - + SDL_DestroyProperties(props); + if (sdlwindow == NULL) { systemScreenMessage(_("Failed to create SDL window")); return; } - if (props != NULL) - SDL_DestroyProperties(props); - if (OPTION(kSDLRenderer) == wxString("default")) { renderer = SDL_CreateRenderer(sdlwindow, NULL); } else {