Skip to content

Commit 8517c1d

Browse files
committed
add null check for bitmapinfo delete
sometimes gets called before bitmap is initialized...
1 parent 2551b5d commit 8517c1d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/Managers/GLResourceMan.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,7 @@ GLuint GLResourceMan::UpdateDynamicBitmap(BITMAP* bitmap, bool updated, const st
154154

155155
void GLResourceMan::DestroyBitmapInfo(BITMAP* bitmap) {
156156
GLBitmapInfo* info = GetBitmapInfo(bitmap);
157-
rlUnloadTexture(info->m_Texture);
158-
}
157+
if (info) {
158+
rlUnloadTexture(info->m_Texture);
159+
}
160+
}

0 commit comments

Comments
 (0)