Skip to content

Commit

Permalink
Video::BlitGameSpriteWithPalette: don't crash if there was no palette
Browse files Browse the repository at this point in the history
... in the first place
  • Loading branch information
lynxlynxlynx committed Apr 21, 2018
1 parent cc13849 commit ea43fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gemrb/core/Video.cpp
Expand Up @@ -247,7 +247,7 @@ void Video::BlitGameSpriteWithPalette(Sprite2D* spr, Palette* pal, int x, int y,
spr->SetPalette(pal);
BlitGameSprite(spr, x, y, flags, tint, cover, clip);
spr->SetPalette(oldpal);
oldpal->release();
if (oldpal) oldpal->release();
} else {
BlitGameSprite(spr, x, y, flags, tint, cover, clip);
}
Expand Down

0 comments on commit ea43fdf

Please sign in to comment.