Browse Source

Fixed skill timers being added even if source has been already removed from map and is about to be freed (bug:5277).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15582 54d463be-8e91-2dee-dedb-b68131a5f0ec
gepard1984 13 years ago
parent
commit
0c87e6ef7a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/map/skill.c

+ 2 - 0
src/map/skill.c

@@ -2914,6 +2914,8 @@ int skill_addtimerskill (struct block_list *src, unsigned int tick, int target,
 	int i;
 	struct unit_data *ud;
 	nullpo_retr(1, src);
+	if (src->prev == NULL)
+		return 0;
 	ud = unit_bl2ud(src);
 	nullpo_retr(1, ud);