[client,sdl] reset connection dialog on sdl quit

This commit is contained in:
Armin Novak 2023-12-20 13:31:00 +01:00 committed by akallabeth
parent 86dbabfc4d
commit 46179077b9
2 changed files with 4 additions and 2 deletions

View File

@ -65,8 +65,8 @@ SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, SDL_RWops* op
} }
SdlWidget::SdlWidget(SdlWidget&& other) noexcept SdlWidget::SdlWidget(SdlWidget&& other) noexcept
: _font(std::move(other._font)), _rect(std::move(other._rect)), _input(other._input), : _font(std::move(other._font)), _image(other._image), _rect(std::move(other._rect)),
_wrap(other._wrap), _text_width(other._text_width), _image(other._image) _input(other._input), _wrap(other._wrap), _text_width(other._text_width)
{ {
other._font = nullptr; other._font = nullptr;
other._image = nullptr; other._image = nullptr;

View File

@ -678,7 +678,9 @@ static void sdl_cleanup_sdl(SdlContext* sdl)
if (!sdl) if (!sdl)
return; return;
std::lock_guard<CriticalSection> lock(sdl->critical);
sdl->windows.clear(); sdl->windows.clear();
sdl->connection_dialog.reset();
sdl_destroy_primary(sdl); sdl_destroy_primary(sdl);