Skip to content

Commit bd45b32

Browse files
committed
Fixed segfault in scanning for UVsets (oddly this wasn't a problem on my main worstation but other people and my laptop triggered it in debug). Fixes #49
1 parent 73cadee commit bd45b32

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/GafferCycles/IECoreCyclesPreview/MeshAlgo.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,17 @@ ccl::Mesh *convertCommon( const IECoreScene::MeshPrimitive *mesh )
752752
( data->getInterpretation() == GeometricData::Numeric ) )
753753
{
754754
uvsets[it->first] = it->second;
755-
variablesToConvert.erase( it );
755+
it = variablesToConvert.erase( it );
756+
}
757+
else
758+
{
759+
++it;
756760
}
757761
}
758-
++it;
762+
else
763+
{
764+
++it;
765+
}
759766
}
760767
// Find the best candidate for the first UVset.
761768
int rank = -1;

0 commit comments

Comments
 (0)