Problem with "Unreferenced Local Variable"?

So… I’m Getting this error each and every single time, tried everything to fix it, but no luck. Anyone?

102512-the+error.jpg

void AHexagonTile::FindDirections() {

for (TActorIterator<AActor> ActorItr(GetWorld(), AHexagonTile::GetClass()); ActorItr; ++ActorItr)
{
	AHexagonTile* DirectionHexa;

	if (DirectionHexa->CoordinateX == CoordinateX -1)
		if (DirectionHexa->CoordinateY == CoordinateY)
			Directions.Add(DirectionHexa); //Adding the one with (X,Y : -1, 0)

	if (DirectionHexa->CoordinateX == CoordinateX + 1)
		if (DirectionHexa->CoordinateY == CoordinateY)
			Directions.Add(DirectionHexa); //Adding the one with (X,Y : +1, 0)

	if (DirectionHexa->CoordinateX == CoordinateX + 1)
		if (DirectionHexa->CoordinateY == CoordinateY -1)
			Directions.Add(DirectionHexa); //Adding the one with (X,Y : +1, -1)

	if (DirectionHexa->CoordinateX == CoordinateX - 1)
		if (DirectionHexa->CoordinateY == CoordinateY - 1)
			Directions.Add(DirectionHexa); //Adding the one with (X,Y : -1, -1)

	if (DirectionHexa->CoordinateX == CoordinateX)
		if (DirectionHexa->CoordinateY == CoordinateY + 1)
			Directions.Add(DirectionHexa); //Adding the one with (X,Y : 0, +1)

	if (DirectionHexa->CoordinateX == CoordinateX)
		if (DirectionHexa->CoordinateY == CoordinateY - 1)
			Directions.Add(DirectionHexa); //Adding the one with (X,Y : 0, -1)

}

}

Is this your actual function or did you just leave out some parts of the code? For example filling DirectionHexa variable?

If that’s not the case, then the issue might be with your variable not being initialized.