Skip to content

Commit

Permalink
Fix crash attempting to remove sprite zoom level from empty entry
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Sep 22, 2023
1 parent e160693 commit ed75592
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/spritecache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ struct SpriteCache {
void RemoveByMissingZoomLevels(uint8 lvls)
{
Sprite *base = this->GetSpritePtr();
if (base == nullptr) {
return;
}
if (base->missing_zoom_levels == lvls) {
/* erase top level entry */
this->ptr.reset(base->next);
Expand Down

0 comments on commit ed75592

Please sign in to comment.