summaryrefslogtreecommitdiffstats
path: root/src/game-server/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/character.cpp')
-rw-r--r--src/game-server/character.cpp10
1 files changed, 6 insertions, 4 deletions
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;
}