Skip to content

Commit

Permalink
Fix crash if line is not constructed
Browse files Browse the repository at this point in the history
  • Loading branch information
brainiac committed Feb 12, 2019
1 parent 975df4d commit 6531d6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugin/NavigationPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ void NavigationPath::SetShowNavigationPaths(bool renderPaths)
if (m_debugDrawGrp)
g_renderHandler->RemoveRenderable(m_debugDrawGrp.get());

m_line->SetVisible(false);
m_line.reset();
if (m_line)
{
m_line->SetVisible(false);
m_line.reset();
}
m_debugDrawGrp.reset();
}
}
Expand Down

0 comments on commit 6531d6b

Please sign in to comment.