[Scummvm-git-logs] scummvm master -> 1ec6adb304ebfb933bc0fe3a677f14e4ec3a7c6d
digitall
noreply at scummvm.org
Sun Jan 2 17:10:19 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1ec6adb304 SCI: Abort Resource Patching if Resource Data Loading has Failed
Commit: 1ec6adb304ebfb933bc0fe3a677f14e4ec3a7c6d
https://github.com/scummvm/scummvm/commit/1ec6adb304ebfb933bc0fe3a677f14e4ec3a7c6d
Author: D G Turner (digitall at scummvm.org)
Date: 2022-01-02T17:08:39Z
Commit Message:
SCI: Abort Resource Patching if Resource Data Loading has Failed
This may fix bug #13192 (SCI: Police Quest 4 - Random Crashes), but
is good practice anyway.
Changed paths:
engines/sci/resource/resource_patcher.cpp
diff --git a/engines/sci/resource/resource_patcher.cpp b/engines/sci/resource/resource_patcher.cpp
index 627617e22fa..5c370c702ec 100644
--- a/engines/sci/resource/resource_patcher.cpp
+++ b/engines/sci/resource/resource_patcher.cpp
@@ -549,6 +549,11 @@ void ResourcePatcher::scanSource(ResourceManager *resMan) {
void ResourcePatcher::patchResource(Resource &resource, const GameResourcePatch &patch) const {
const byte *oldData;
const byte *source = resource.data();
+ if (!source) {
+ ResourceId resourceId(patch.resourceType, patch.resourceNumber);
+ warning("Unable to apply patch %s: source data is null", resourceId.toString().c_str());
+ return;
+ }
byte *target;
// New resources that came from ResourcePatcher need to get allocated or
More information about the Scummvm-git-logs
mailing list