diff --git a/regamedll/game_shared/bot/nav_area.cpp b/regamedll/game_shared/bot/nav_area.cpp
index f0c9de93..4e4bb309 100644
--- a/regamedll/game_shared/bot/nav_area.cpp
+++ b/regamedll/game_shared/bot/nav_area.cpp
@@ -294,6 +294,8 @@ void CNavArea::OnDestroyNotify(CNavArea *dead)
 // Connect this area to given area in given direction
 void CNavArea::ConnectTo(CNavArea *area, NavDirType dir)
 {
+	DbgAssert(area);
+
 	// check if already connected
 	for (NavConnectList::iterator iter = m_connect[dir].begin(); iter != m_connect[dir].end(); iter++)
 	{
diff --git a/regamedll/game_shared/bot/nav_area.h b/regamedll/game_shared/bot/nav_area.h
index 87fbb369..434424a1 100644
--- a/regamedll/game_shared/bot/nav_area.h
+++ b/regamedll/game_shared/bot/nav_area.h
@@ -683,7 +683,7 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
 		int ladderTopDir;
 		while (true)
 		{
-			CNavArea *newArea;
+			CNavArea *newArea = nullptr;
 			NavTraverseType how;
 			const CNavLadder *ladder = nullptr;
 
@@ -716,6 +716,11 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
 				newArea = (*floorIter).area;
 				how = (NavTraverseType)dir;
 				floorIter++;
+
+				DbgAssert(newArea);
+
+				if (!newArea)
+					continue;
 			}
 			// search ladders
 			else