mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
GOB: Don't crash when drawPackedSprite() can't open the sprite
This commit is contained in:
parent
099a76ea20
commit
1cb6cc0218
@ -332,6 +332,10 @@ void Video::drawPackedSprite(byte *sprBuf, int16 width, int16 height,
|
||||
void Video::drawPackedSprite(const char *path, Surface &dest, int width) {
|
||||
int32 size;
|
||||
byte *data = _vm->_dataIO->getFile(path, size);
|
||||
if (!data) {
|
||||
warning("Video::drawPackedSprite(): Failed to open sprite \"%s\"", path);
|
||||
return;
|
||||
}
|
||||
|
||||
drawPackedSprite(data, width, dest.getHeight(), 0, 0, 0, dest);
|
||||
delete[] data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user