mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 17:03:13 +00:00
LAB: Add a couple of safeguards
This commit is contained in:
parent
e88d09d2ec
commit
26c48305b5
@ -158,6 +158,9 @@ bool Resource::readViews(uint16 roomNum) {
|
||||
}
|
||||
|
||||
void Resource::freeViews(uint16 roomNum) {
|
||||
if (!_vm->_rooms)
|
||||
return;
|
||||
|
||||
for (uint16 i = 0; i < 4; i++)
|
||||
freeView(_vm->_rooms[roomNum]._view[i]);
|
||||
|
||||
|
@ -284,6 +284,8 @@ void LabEngine::doJournal() {
|
||||
|
||||
delete[] _blankJournal;
|
||||
delete[] _journalBackImage->_imageData;
|
||||
_blankJournal = _journalBackImage->_imageData = nullptr;
|
||||
|
||||
_event->freeButtonList(&_journalButtonList);
|
||||
_graphics->closeFont(&_journalFont);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user