Additional check in script_instancegetid (#7929)

This commit is contained in:
Atemo 2023-09-15 17:36:50 +02:00 committed by GitHub
parent 10c78203ba
commit 8196149b2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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