[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,7 +162,8 @@ SDL_Texture* SdlWidget::render_text_wrapped(SDL_Renderer* renderer, const std::s
SdlWidget::~SdlWidget()
{
TTF_CloseFont(_font);
SDL_DestroyTexture(_image);
if (_image)
SDL_DestroyTexture(_image);
}
bool SdlWidget::error_ex(Uint32 res, const char* what, const char* file, size_t line,