mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
DIRECTOR: For disposed objects, make getMethod return a warning
D4 will throw an exception if you try and use a method on a disposed object. In the editor this halts execution, in the projector this seems to just be ignored. As there are games which rely on this ignorance, we can't halt on a disposed object. Fixes the EXE loader in Opera Fatal.
This commit is contained in:
parent
5e36a43ea0
commit
6444b9dfd5
@ -132,8 +132,11 @@ public:
|
||||
};
|
||||
|
||||
Symbol getMethod(const Common::String &methodName) override {
|
||||
Symbol sym;
|
||||
|
||||
if (_disposed) {
|
||||
error("Method '%s' called on disposed object <%s>", methodName.c_str(), asString().c_str());
|
||||
warning("Method '%s' called on disposed object <%s>, returning VOID", methodName.c_str(), asString().c_str());
|
||||
return sym;
|
||||
}
|
||||
|
||||
Common::String methodId;
|
||||
@ -143,8 +146,6 @@ public:
|
||||
methodId = methodName;
|
||||
}
|
||||
|
||||
|
||||
Symbol sym;
|
||||
if (_methods && _methods->contains(methodId)) {
|
||||
sym = (*_methods)[methodId];
|
||||
sym.target = this;
|
||||
|
Loading…
Reference in New Issue
Block a user