summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-20 01:16:59 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-20 01:16:59 +0000
commit1bf17bc6fdf7ce3cf037b9c56d61da82f5956aab (patch)
tree61d1387d9d9980087a57bc3f0fe3b64a86bb8d7a /src/map/skill.c
parent4bb50b23f21075ccb57426a2e04ca637ed56994f (diff)
downloadhercules-1bf17bc6fdf7ce3cf037b9c56d61da82f5956aab.tar.gz
hercules-1bf17bc6fdf7ce3cf037b9c56d61da82f5956aab.tar.bz2
hercules-1bf17bc6fdf7ce3cf037b9c56d61da82f5956aab.tar.xz
hercules-1bf17bc6fdf7ce3cf037b9c56d61da82f5956aab.zip
* Simplified the search in pop_timer_heap and added more debug info to help determine the source condition of timer errors. (bugreport:1860)
* Fixed crash in skill_castend_id. (bugreport:1860) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12968 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index cf81ad720..d817e5eba 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5216,15 +5216,28 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
*------------------------------------------*/
int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
{
- struct block_list *target, *src = map_id2bl(id);
+ struct block_list* target = NULL;
+ struct block_list* src = NULL;
struct map_session_data* sd = NULL;
struct homun_data* hd = NULL; //[orn]
struct mob_data* md = NULL;
- struct unit_data* ud = unit_bl2ud(src);
- struct status_change *sc = NULL;
+ struct unit_data* ud = NULL;
+ struct status_change* sc = NULL;
int inf,inf2,flag=0;
- nullpo_retr(0, ud);
+ src = map_id2bl(id);
+ if( src == NULL )
+ {
+ ShowDebug("skill_castend_id: src == NULL (tid=%d, id=%d)\n", tid, id);
+ return 0;// not found
+ }
+
+ ud = unit_bl2ud(src);
+ if( ud == NULL )
+ {
+ ShowDebug("skill_castend_id: ud == NULL (tid=%d, id=%d)\n", tid, id);
+ return 0;// ???
+ }
sd = BL_CAST(BL_PC, src);
hd = BL_CAST(BL_HOM, src);