Skip to content

Commit

Permalink
Add missing check
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Dec 13, 2023
1 parent f8927df commit d549817
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Common/UI/Context.cpp
Expand Up @@ -22,8 +22,10 @@ UIContext::~UIContext() {
sampler_->Release();
delete fontStyle_;
delete textDrawer_;
uitexture_->Release();
fontTexture_->Release();
if (uitexture_)
uitexture_->Release();
if (fontTexture_)
fontTexture_->Release();
}

void UIContext::Init(Draw::DrawContext *thin3d, Draw::Pipeline *uipipe, Draw::Pipeline *uipipenotex, DrawBuffer *uidrawbuffer) {
Expand Down

0 comments on commit d549817

Please sign in to comment.