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 {