Procházet zdrojové kódy

* Fixed crashing in mob.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6782 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lance před 19 roky
rodič
revize
4519951609
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/mob.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/05/26
+	* Fixed crashing in mob.c [Lance]
 	* Patches to allow everything to work right. + 1 more sample script. [Lance]
 	* Mob control engine tested 99% working so far. [Lance]
 	* Change scripting engine's NPC scope vars to dot (.) style.

+ 1 - 1
src/map/mob.c

@@ -2169,7 +2169,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
 			guild_agit_break(md);
 	}
 
-	if(src->type == BL_MOB){
+	if(src && src->type == BL_MOB){
 		struct mob_data *smd = (struct mob_data *)src;
 		if(smd->nd){
 			setd_sub(NULL, NULL, ".ai_action", 0, (void *)(int)5, &smd->nd->u.scr.script->script_vars);