Explorar o código

Fixed a possible null pointer

Follow up to e93c888
See https://rathena.org/board/topic/108045-map-server-crash-after-using-skill-manhole/
Lemongrass3110 %!s(int64=8) %!d(string=hai) anos
pai
achega
4687247769
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/map/status.c

+ 1 - 1
src/map/status.c

@@ -2012,7 +2012,7 @@ bool status_check_skilluse(struct block_list *src, struct block_list *target, ui
 			break;
 		case SC_MANHOLE:
 			// Skill is disabled against special racial grouped monsters(GvG and Battleground)
-			if (status_get_race2(target) == RC2_GVG || status_get_race2(target) == RC2_BATTLEFIELD)
+			if (target && ( status_get_race2(target) == RC2_GVG || status_get_race2(target) == RC2_BATTLEFIELD ) )
 				return false;
 		default:
 			break;