From 590cab6d67e00e0620cf31fc8fbe5ed5ec1b7abf Mon Sep 17 00:00:00 2001 From: ai4rei Date: Fri, 17 Dec 2010 20:04:26 +0000 Subject: * Added temporary check to skill_delunitgroup to prevent crashes when 'group' is NULL and added some debug messages to track down the source of the crash (bugreport:3504). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14599 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index e77703e1f..3c4cbcd21 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10161,13 +10161,17 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count, /*========================================== * *------------------------------------------*/ -int skill_delunitgroup (struct skill_unit_group *group) +int skill_delunitgroup_(struct skill_unit_group *group, const char* file, int line, const char* func) { struct block_list* src; struct unit_data *ud; int i,j; - nullpo_ret(group); + if( group == NULL ) + { + ShowDebug("skill_delunitgroup: group is NULL (source=%s:%d, %s)! Please report this! (#3504)\n", file, line, func); + return 0; + } src=map_id2bl(group->src_id); ud = unit_bl2ud(src); -- cgit v1.2.3-70-g09d2