diff options
author | shennetsind <ind@henn.et> | 2013-04-06 20:49:26 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-06 20:49:26 -0300 |
commit | 37f40ff5eaae41562629e4b7a429049d681fe2fa (patch) | |
tree | ffda205a2ed5bf5d19b07ecd649edd6a37d9ef08 /src/map/status.c | |
parent | 7e35b764fac24c51f4fc4a486ef33cf97b1225cb (diff) | |
download | hercules-37f40ff5eaae41562629e4b7a429049d681fe2fa.tar.gz hercules-37f40ff5eaae41562629e4b7a429049d681fe2fa.tar.bz2 hercules-37f40ff5eaae41562629e4b7a429049d681fe2fa.tar.xz hercules-37f40ff5eaae41562629e4b7a429049d681fe2fa.zip |
Fixed FrostNova Crash
Special Thanks to Beret for pointing it out.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/status.c b/src/map/status.c index 8589a54e7..5d41acbe0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1495,13 +1495,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin } if( skill_id ) { - int i; - for(i = 0; i < map[src->m].zone->disabled_skills_count; i++) { - if( skill_id == map[src->m].zone->disabled_skills[i]->nameid && (map[src->m].zone->disabled_skills[i]->type&src->type) ) { - if( src->type == BL_PC ) - clif->msg((TBL_PC*)src, SKILL_CANT_USE_AREA); // This skill cannot be used within this area - return 0; + if( src ) { + int i; + + for(i = 0; i < map[src->m].zone->disabled_skills_count; i++) { + if( skill_id == map[src->m].zone->disabled_skills[i]->nameid && (map[src->m].zone->disabled_skills[i]->type&src->type) ) { + if( src->type == BL_PC ) + clif->msg((TBL_PC*)src, SKILL_CANT_USE_AREA); // This skill cannot be used within this area + return 0; + } } } |