Browse Source

crashfix: `const U32 numVerts = curEntry.vertBuffer->` is invalid for vectorlights

AzaezelX 5 years ago
parent
commit
33d82ea1f6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Engine/source/lighting/advanced/advancedLightBinManager.cpp

+ 2 - 0
Engine/source/lighting/advanced/advancedLightBinManager.cpp

@@ -359,6 +359,8 @@ void AdvancedLightBinManager::render( SceneRenderState *state )
    {
       LightBinEntry& curEntry = *itr;
       LightInfo *curLightInfo = curEntry.lightInfo;
+      if (curEntry.lightInfo->getType() >= LightInfo::Vector)
+         continue;
       LightMaterialInfo *curLightMat = curEntry.lightMaterial;
       const U32 numPrims = curEntry.numPrims;
       const U32 numVerts = curEntry.vertBuffer->mNumVerts;