[client,sdl] fix verbose logging

only call SDL_DestroyTexture if texture != NULL
This commit is contained in:
akallabeth 2024-01-22 11:57:10 +01:00 committed by akallabeth
parent f2794daf38
commit 465745131e

View File

@ -162,6 +162,7 @@ SDL_Texture* SdlWidget::render_text_wrapped(SDL_Renderer* renderer, const std::s
SdlWidget::~SdlWidget()
{
TTF_CloseFont(_font);
if (_image)
SDL_DestroyTexture(_image);
}