summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-25 21:41:07 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-31 23:06:29 +0300
commitf0d5be2db32afc7b4382276ffa3c60a1354bea8e (patch)
tree919fc1db442339a32a88bde0fa6f68e320e64dce /src/map/skill.c
parenta71a056abb8931aa4a11d0cde296fe9de68ee6df (diff)
downloadhercules-f0d5be2db32afc7b4382276ffa3c60a1354bea8e.tar.gz
hercules-f0d5be2db32afc7b4382276ffa3c60a1354bea8e.tar.bz2
hercules-f0d5be2db32afc7b4382276ffa3c60a1354bea8e.tar.xz
hercules-f0d5be2db32afc7b4382276ffa3c60a1354bea8e.zip
Add some missing null pointer checks after automatic checks.
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 5eb319c02..a89f61a49 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1653,7 +1653,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint1
sd->state.autocast = 0;
}
- if( sd && sd->autobonus3[0].rate ) {
+ if (sd->autobonus3[0].rate) {
for( i = 0; i < ARRAYLENGTH(sd->autobonus3); i++ ) {
if( rnd()%1000 >= sd->autobonus3[i].rate )
continue;
@@ -16255,6 +16255,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
}
}
+ // useless check for !group ?
//Don't continue if unit or even group is expired and has been deleted.
if( !group || !su->alive )
return 0;