Skip to content

Commit

Permalink
Fixed viewer crash when pathfinding fails
Browse files Browse the repository at this point in the history
  • Loading branch information
namreeb committed Jul 25, 2024
1 parent c494bbc commit 6d04d7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MapViewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,11 @@ LRESULT CALLBACK GuiWindowProc(HWND hWnd, UINT message, WPARAM wParam,
if (gNavMesh->FindPath(gStart, hit, path, false))
gRenderer->AddPath(path);
else
{
MessageBox(nullptr, "FindPath failed", "Path Find",
0);
return TRUE;
}

auto const& prev_hop = path[path.size() - 2];
float height;
Expand Down

0 comments on commit 6d04d7f

Please sign in to comment.