diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index 8ffa7d0ea..c226473b5 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4222,9 +4222,12 @@ int buildin_sc_start(struct script_state *st) bl = map_id2bl(conv_num(st,& (st->stack->stack_data[st->start+5]))); else bl = map_id2bl(st->rid); - if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag) - bl = map_id2bl(((struct map_session_data *)bl)->skilltarget); - skill_status_change_start(bl,type,val1,0,0,0,tick,0); + + if (bl != 0) { + if(bl->type == BL_PC && ((struct map_session_data *)bl)->state.potionpitcher_flag) + bl = map_id2bl(((struct map_session_data *)bl)->skilltarget); + skill_status_change_start(bl,type,val1,0,0,0,tick,0); + } return 0; } |