summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 777714a84..319fc5d14 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8327,9 +8327,11 @@ int buildin_misceffect(struct script_state *st)
int type;
type=conv_num(st,& (st->stack->stack_data[st->start+2]));
- if(st->oid)
- clif_misceffect2(map_id2bl(st->oid),type);
- else{
+ if(st->oid) {
+ struct block_list *bl = map_id2bl(st->oid);
+ if (bl)
+ clif_misceffect2(bl,type);
+ } else{
struct map_session_data *sd=script_rid2sd(st);
if(sd)
clif_misceffect2(&sd->bl,type);