|
@@ -21310,7 +21310,7 @@ int script_instancegetid(struct script_state* st, e_instance_mode mode)
|
|
if (mode == IM_NONE) {
|
|
if (mode == IM_NONE) {
|
|
struct npc_data *nd = map_id2nd(st->oid);
|
|
struct npc_data *nd = map_id2nd(st->oid);
|
|
|
|
|
|
- if (nd->instance_id > 0)
|
|
|
|
|
|
+ if (nd && nd->instance_id > 0)
|
|
instance_id = nd->instance_id;
|
|
instance_id = nd->instance_id;
|
|
} else {
|
|
} else {
|
|
map_session_data *sd = map_id2sd(st->rid);
|
|
map_session_data *sd = map_id2sd(st->rid);
|