Browse Source

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 years ago
parent
commit
4687247769
1 changed files with 1 additions and 1 deletions
  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;
 			break;
 		case SC_MANHOLE:
 		case SC_MANHOLE:
 			// Skill is disabled against special racial grouped monsters(GvG and Battleground)
 			// 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;
 				return false;
 		default:
 		default:
 			break;
 			break;