aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/plugin.cpp
diff options
context:
space:
mode:
authorMax Horn2007-03-04 09:41:58 +0000
committerMax Horn2007-03-04 09:41:58 +0000
commit5f295016ddadec9c36af20120446a110b5f59ff4 (patch)
treeb91d9e20b1e3916ffee4531af6e8712dd9114cde /engines/scumm/plugin.cpp
parentb25c7933a5dff6a63f595d136fcbec9fbe195af2 (diff)
downloadscummvm-rg350-5f295016ddadec9c36af20120446a110b5f59ff4.tar.gz
scummvm-rg350-5f295016ddadec9c36af20120446a110b5f59ff4.tar.bz2
scummvm-rg350-5f295016ddadec9c36af20120446a110b5f59ff4.zip
Avoid crash in Engine_SCUMM_create when an inconsistent platform override is present
svn-id: r25966
Diffstat (limited to 'engines/scumm/plugin.cpp')
-rw-r--r--engines/scumm/plugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index 43abca660a..d2d242f26b 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1602,6 +1602,12 @@ PluginError Engine_SCUMM_create(OSystem *syst, Engine **engine) {
}
}
}
+
+ // If we narrowed it down too much, abort
+ if (results.empty()) {
+ warning("Engine_SCUMM_create: Game data inconsistent with platform override");
+ return kNoGameDataFoundError;
+ }
// Still no unique match found -> we just use the first one
if (results.size() > 1) {