[client,sdl] fix verbose logging
only call SDL_DestroyTexture if texture != NULL
This commit is contained in:
parent
f2794daf38
commit
465745131e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user