diff options
author | Martin Kiewitz | 2010-07-24 08:20:54 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-24 08:20:54 +0000 |
commit | c8dc2e4b8b9b82e9eeb2d3dabedc125bbb6818df (patch) | |
tree | 4dabfda5b66a4646b9c5b0263706df68deff1a6c | |
parent | 0191f8fd7157e29e92f89f82cb15e44949c11357 (diff) | |
download | scummvm-rg350-c8dc2e4b8b9b82e9eeb2d3dabedc125bbb6818df.tar.gz scummvm-rg350-c8dc2e4b8b9b82e9eeb2d3dabedc125bbb6818df.tar.bz2 scummvm-rg350-c8dc2e4b8b9b82e9eeb2d3dabedc125bbb6818df.zip |
SCI: locking picture resource
fixes sq6 crashing with resource data NULL pointer
svn-id: r51240
-rw-r--r-- | engines/sci/graphics/picture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp index 0b74784143..20228b75c4 100644 --- a/engines/sci/graphics/picture.cpp +++ b/engines/sci/graphics/picture.cpp @@ -43,10 +43,11 @@ GfxPicture::GfxPicture(ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, } GfxPicture::~GfxPicture() { + _resMan->unlockResource(_resource); } void GfxPicture::initData(GuiResourceId resourceId) { - _resource = _resMan->findResource(ResourceId(kResourceTypePic, resourceId), false); + _resource = _resMan->findResource(ResourceId(kResourceTypePic, resourceId), true); if (!_resource) { error("picture resource %d not found", resourceId); } |