Added check against null
This commit is contained in:
@@ -425,7 +425,9 @@ FltExportVisitor::apply( osg::Geode& node )
|
||||
else if ( (prim->getType() == osg::PrimitiveSet::DrawElementsUBytePrimitiveType) ||
|
||||
(prim->getType() == osg::PrimitiveSet::DrawElementsUShortPrimitiveType) ||
|
||||
(prim->getType() == osg::PrimitiveSet::DrawElementsUIntPrimitiveType) )
|
||||
{
|
||||
handleDrawElements( dynamic_cast<osg::DrawElements*>( prim ), *geom, node );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string warning( "fltexp: Unknown PrimitiveSet type." );
|
||||
|
||||
@@ -1044,6 +1044,8 @@ FltExportVisitor::handleDrawArrayLengths( const osg::DrawArrayLengths* dal, cons
|
||||
void
|
||||
FltExportVisitor::handleDrawElements( const osg::DrawElements* de, const osg::Geometry& geom, const osg::Geode& geode )
|
||||
{
|
||||
if (!de) return;
|
||||
|
||||
GLenum mode = de->getMode();
|
||||
|
||||
int n( 0 );
|
||||
|
||||
Reference in New Issue
Block a user