[client,sdl] fix RWops leak

This commit is contained in:
akallabeth 2023-09-14 14:59:27 +02:00 committed by akallabeth
parent bd595d363d
commit 54a5512939

View File

@ -45,6 +45,7 @@ SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, bool input)
auto ops = SDL_RWFromConstMem(font_buffer.data(), static_cast<int>(font_buffer.size()));
if (ops)
_font = TTF_OpenFontRW(ops, 0, 64);
SDL_RWclose(ops);
}
SdlWidget::SdlWidget(SdlWidget&& other) noexcept