mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 12:32:36 +00:00
Avoid crash when object paging encounters an empty shape
This commit is contained in:
parent
f5f59c1149
commit
7a4efe3979
@ -289,7 +289,9 @@ namespace MWRender
|
|||||||
}
|
}
|
||||||
virtual void apply(osg::Geometry& geom)
|
virtual void apply(osg::Geometry& geom)
|
||||||
{
|
{
|
||||||
mResult.mNumVerts += geom.getVertexArray()->getNumElements();
|
if (osg::Array* array = geom.getVertexArray())
|
||||||
|
mResult.mNumVerts += array->getNumElements();
|
||||||
|
|
||||||
++mResult.mStateSetCounter[mCurrentStateSet];
|
++mResult.mStateSetCounter[mCurrentStateSet];
|
||||||
++mGlobalStateSetCounter[mCurrentStateSet];
|
++mGlobalStateSetCounter[mCurrentStateSet];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user