aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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