mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-10-16 22:06:05 +00:00
handle the case when allocSpan fails to allocate memory. adds bool return types to rcAddSpan, rcRasterizeTriangle and rcRasterizeTriangles
This commit is contained in:
@@ -438,7 +438,11 @@ bool Sample_SoloMesh::handleBuild()
|
||||
// the are type for each of the meshes and rasterize them.
|
||||
memset(m_triareas, 0, ntris*sizeof(unsigned char));
|
||||
rcMarkWalkableTriangles(m_ctx, m_cfg.walkableSlopeAngle, verts, nverts, tris, ntris, m_triareas);
|
||||
rcRasterizeTriangles(m_ctx, verts, nverts, tris, m_triareas, ntris, *m_solid, m_cfg.walkableClimb);
|
||||
if (!rcRasterizeTriangles(m_ctx, verts, nverts, tris, m_triareas, ntris, *m_solid, m_cfg.walkableClimb))
|
||||
{
|
||||
m_ctx->log(RC_LOG_ERROR, "buildNavigation: Could not rasterize triangles.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_keepInterResults)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user