mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-23 20:20:09 +00:00
Fixed potential crash in Far::StencilTableFactory
Now StencilTableFactory::AppendLocalPointStencilTable() does nothing when the localPointStencilTable is empty. This avoids a potential crash (failed assertion) when both the baseStencilTable and the localPointStencilTable are empty, as is the case for simple geometry like the all-quads torus regression test shape.
This commit is contained in:
parent
cf7135eb2a
commit
d1b9e45c13
@ -212,7 +212,8 @@ StencilTableFactory::AppendLocalPointStencilTable(
|
||||
|
||||
// factorize and append.
|
||||
if (baseStencilTable == NULL or
|
||||
localPointStencilTable == NULL) return NULL;
|
||||
localPointStencilTable == NULL or
|
||||
localPointStencilTable->GetNumStencils() == 0) return NULL;
|
||||
|
||||
// baseStencilTable can be built with or without singular stencils
|
||||
// (single weight of 1.0f) as place-holders for coarse mesh vertices.
|
||||
|
Loading…
Reference in New Issue
Block a user