Sfoglia il codice sorgente

Fixed potential map server crash.

* Added a null pointer check
* Thanks to @admkakaroto!
Jey 7 anni fa
parent
commit
5fda4f0f65
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/map/skill.c

+ 1 - 1
src/map/skill.c

@@ -10830,7 +10830,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 			clif_skill_fail(sd, skill_id, USESKILL_FAIL_TOTARGET, 0);
 			break;
 		}
-		if (tsc->count && tsc->data[type]) // Refresh the status only if it's already active.
+		if (tsc && tsc->count && tsc->data[type]) // Refresh the status only if it's already active.
 			sc_start(src, bl, type, 100, skill_lv, skill_get_time(skill_id, skill_lv));
 		else {
 			sc_start(src, bl, type, 100, skill_lv, skill_get_time(skill_id, skill_lv));