diff --git a/client/SDL/dialogs/sdl_widget.cpp b/client/SDL/dialogs/sdl_widget.cpp index 2d1fc197c..7ae2a8af1 100644 --- a/client/SDL/dialogs/sdl_widget.cpp +++ b/client/SDL/dialogs/sdl_widget.cpp @@ -65,8 +65,8 @@ SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, SDL_RWops* op } SdlWidget::SdlWidget(SdlWidget&& other) noexcept - : _font(std::move(other._font)), _rect(std::move(other._rect)), _input(other._input), - _wrap(other._wrap), _text_width(other._text_width), _image(other._image) + : _font(std::move(other._font)), _image(other._image), _rect(std::move(other._rect)), + _input(other._input), _wrap(other._wrap), _text_width(other._text_width) { other._font = nullptr; other._image = nullptr; diff --git a/client/SDL/sdl_freerdp.cpp b/client/SDL/sdl_freerdp.cpp index 09546c0aa..fd89cf75c 100644 --- a/client/SDL/sdl_freerdp.cpp +++ b/client/SDL/sdl_freerdp.cpp @@ -678,7 +678,9 @@ static void sdl_cleanup_sdl(SdlContext* sdl) if (!sdl) return; + std::lock_guard lock(sdl->critical); sdl->windows.clear(); + sdl->connection_dialog.reset(); sdl_destroy_primary(sdl);