From b5ef81d1bed0caa6fd71d63c9d6ae06e5fcd0d5e Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 9 Nov 2008 17:10:56 +0000 Subject: Fixed crash when a script can't be found. No idea why this could happen though. --- src/game-server/character.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp index 61a5e1d..3c48169 100644 --- a/src/game-server/character.cpp +++ b/src/game-server/character.cpp @@ -148,10 +148,12 @@ void Character::useSpecial(int id) //TODO: check if the character is allowed to use it right now Script *s = getMap()->getScript(); - s->prepare("cast"); - s->push(this); - s->push(id); - s->execute(); + if (s) { + s->prepare("cast"); + s->push(this); + s->push(id); + s->execute(); + } return; } -- cgit