From d9db7d3d15ea97b50d72ed358cce6681d036f94b Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:51:28 +0200 Subject: [PATCH] Recast: fix crash in prune tool Always check if we allocated a flag buffer before showing the options. --- src/naveditor/NavMeshPruneTool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/naveditor/NavMeshPruneTool.cpp b/src/naveditor/NavMeshPruneTool.cpp index ea275d12..24b4c89a 100644 --- a/src/naveditor/NavMeshPruneTool.cpp +++ b/src/naveditor/NavMeshPruneTool.cpp @@ -238,7 +238,7 @@ void NavMeshPruneTool::handleMenu() dtNavMesh* nav = m_editor->getNavMesh(); if (!nav) return; - if (!m_hitPosSet) return; + if (!m_flags || !m_hitPosSet) return; if (ImGui::Button("Clear Selection")) {