mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 01:36:44 +00:00
Merge pull request #2998 from akortunov/crashfix
Avoid crash when object paging encounters an empty shape
This commit is contained in:
commit
009c18a97d
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue