From d21f2f8479c618c15958ae1f9ac5811b9b035921 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Fri, 31 Dec 2010 01:17:03 +0000 Subject: * Fixed a nullpo crash in pc_gainexp when receiving exp though script command getexp (topic:262958, since r14625). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14644 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/pc.c b/src/map/pc.c index a444c7bba..e7ef23ce9 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4940,7 +4940,7 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int { float nextbp=0, nextjp=0; unsigned int nextb=0, nextj=0; - int leveldiff = sd->status.base_level - status_get_lv(src), modifier = 100; + int leveldiff = src ? ( sd->status.base_level - status_get_lv(src) ) : 0, modifier = 100; nullpo_ret(sd); if(sd->bl.prev == NULL || pc_isdead(sd)) -- cgit v1.2.3-70-g09d2