Browse Source

mVertexFormat validation fix

With Permission from Jeff Faust.

   // AFX CODE BLOCK (bug-fix) <<
(no text, self evident)
Azaezel 10 years ago
parent
commit
a4adf28ef5
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Engine/source/materials/matInstance.cpp

+ 6 - 0
Engine/source/materials/matInstance.cpp

@@ -290,6 +290,12 @@ bool MatInstance::init( const FeatureSet &features,
 //----------------------------------------------------------------------------
 bool MatInstance::reInit()
 {
+   if (!mVertexFormat)
+   {
+      mIsValid = false;
+      return mIsValid;
+   }
+
    SAFE_DELETE(mProcessedMaterial);
    deleteAllHooks();
    mIsValid = processMaterial();