소스 검색

Fixed a possible null pointer

Follow up to e93c888
See https://rathena.org/board/topic/108045-map-server-crash-after-using-skill-manhole/
Lemongrass3110 8 년 전
부모
커밋
4687247769
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;