From af3059c114303950db592f75e38f0f83b0048b8a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Nov 2013 12:58:05 +0100 Subject: KYRA: Properly check parameters in CharacterGenerator::start. Discoverd by CID #1003816. --- engines/kyra/chargen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/kyra') diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp index 80a95da047..80ff42e2c5 100644 --- a/engines/kyra/chargen.cpp +++ b/engines/kyra/chargen.cpp @@ -155,8 +155,10 @@ CharacterGenerator::~CharacterGenerator() { } bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) { - if (!characters && !faceShapes) + if (!characters || !faceShapes) { + warning("CharacterGenerator::start: Called without character data"); return true; + } _characters = characters; _faceShapes = *faceShapes; -- cgit v1.2.3