Преглед изворни кода

Additional check in script_instancegetid (#7929)

Atemo пре 1 година
родитељ
комит
8196149b2b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/map/script.cpp

+ 1 - 1
src/map/script.cpp

@@ -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);