diff options
author | Walter van Niftrik | 2009-05-08 16:21:51 +0000 |
---|---|---|
committer | Walter van Niftrik | 2009-05-08 16:21:51 +0000 |
commit | f4bcd1680fef2d6cc8d66498622c2d6458a22731 (patch) | |
tree | 44ebe5aa6a7144881a4037a684c00fb941bb3bba | |
parent | e933c02fd2b622bb79dcac520e045b405bcb81c8 (diff) | |
download | scummvm-rg350-f4bcd1680fef2d6cc8d66498622c2d6458a22731.tar.gz scummvm-rg350-f4bcd1680fef2d6cc8d66498622c2d6458a22731.tar.bz2 scummvm-rg350-f4bcd1680fef2d6cc8d66498622c2d6458a22731.zip |
SCI: GetMessage: lock resource.
svn-id: r40390
-rw-r--r-- | engines/sci/engine/message.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index b905c4f418..fac6260f90 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -148,11 +148,16 @@ int MessageState::loadRes(int module) { if (_module == module) return 1; + // Unlock old resource + if (_module != -1) + resmgr->unlockResource(current_res, _module, kResourceTypeMessage); + _module = module; - current_res = resmgr->findResource(kResourceTypeMessage, module, 0); + current_res = resmgr->findResource(kResourceTypeMessage, module, 1); if (current_res == NULL || current_res->data == NULL) { sciprintf("Message subsystem: Failed to load %d.MSG\n", module); + _module = -1; return 0; } |