aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorDavid Eriksson2003-11-07 14:05:45 +0000
committerDavid Eriksson2003-11-07 14:05:45 +0000
commite9eb92e201f8a4d214b2923243199142bff903bf (patch)
tree6aee362e25c17210bf5085afde5382d3af2350b3 /queen
parentdc63e3882bedd39cab8b8e4e4b432bab119925b0 (diff)
downloadscummvm-rg350-e9eb92e201f8a4d214b2923243199142bff903bf.tar.gz
scummvm-rg350-e9eb92e201f8a4d214b2923243199142bff903bf.tar.bz2
scummvm-rg350-e9eb92e201f8a4d214b2923243199142bff903bf.zip
Small fixes.
svn-id: r11189
Diffstat (limited to 'queen')
-rw-r--r--queen/logic.cpp6
-rw-r--r--queen/talk.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp
index e6b9eaccaf..0a99dfa5db 100644
--- a/queen/logic.cpp
+++ b/queen/logic.cpp
@@ -1274,8 +1274,10 @@ void Logic::personSetData(int16 noun, const char *actorName, bool loadBank, Pers
}
}
- if (!actor)
- error ("Actor '%s' not found", actorName);
+ if (!actor) {
+ warning("Actor '%s' not found, using default", actorName);
+ actor = 1;
+ }
pp->actor = &_actorData[actor];
pp->bankNum = pp->actor->bankNum;
diff --git a/queen/talk.cpp b/queen/talk.cpp
index 182373b8b9..8cc05ee177 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -127,7 +127,12 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
load(filename);
Person person;
+ memset(&person, 0, sizeof(Person));
_logic->personSetData(personInRoom, "", false, &person);
+
+ if (NULL == person.name) {
+ error("Invalid person object");
+ }
int16 oldLevel = 0;
bool personWalking = false; // OWALK in talk.c