mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
SCI/newgui: RestoreBits() now ignores empty handles
svn-id: r44801
This commit is contained in:
parent
cc236d9799
commit
2ab906bafd
@ -606,11 +606,15 @@ GuiMemoryHandle SciGuiGfx::SaveBits(const Common::Rect &rect, byte screenMask) {
|
||||
}
|
||||
|
||||
void SciGuiGfx::RestoreBits(GuiMemoryHandle memoryHandle) {
|
||||
byte *memoryPtr = kmem(_s->_segMan, memoryHandle);;
|
||||
byte *memoryPtr = NULL;
|
||||
|
||||
if (memoryPtr) {
|
||||
_screen->restoreBits(memoryPtr);
|
||||
kfree(_s->_segMan, memoryHandle);
|
||||
if (!memoryHandle.isNull()) {
|
||||
memoryPtr = kmem(_s->_segMan, memoryHandle);;
|
||||
|
||||
if (memoryPtr) {
|
||||
_screen->restoreBits(memoryPtr);
|
||||
kfree(_s->_segMan, memoryHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user