diff --git a/apps/openmw/mwrender/objectpaging.cpp b/apps/openmw/mwrender/objectpaging.cpp index 0f7e1c422c..c756a3fc7f 100644 --- a/apps/openmw/mwrender/objectpaging.cpp +++ b/apps/openmw/mwrender/objectpaging.cpp @@ -289,7 +289,9 @@ namespace MWRender } virtual void apply(osg::Geometry& geom) { - mResult.mNumVerts += geom.getVertexArray()->getNumElements(); + if (osg::Array* array = geom.getVertexArray()) + mResult.mNumVerts += array->getNumElements(); + ++mResult.mStateSetCounter[mCurrentStateSet]; ++mGlobalStateSetCounter[mCurrentStateSet]; }