Browse Source

Merge branch 'master' into issue-1262

Kim Kulling 8 years ago
parent
commit
3f68278ea0
3 changed files with 3 additions and 4 deletions
  1. 2 1
      code/BlenderLoader.cpp
  2. 1 1
      code/RemoveVCProcess.cpp
  3. 0 2
      test/unit/utRemoveVCProcess.cpp

+ 2 - 1
code/BlenderLoader.cpp

@@ -110,6 +110,7 @@ BlenderImporter::~BlenderImporter()
 }
 }
 
 
 static const char* Tokens[] = { "BLENDER" };
 static const char* Tokens[] = { "BLENDER" };
+static const char* TokensForSearch[] = { "blender" };
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Returns whether the class can handle the format of the given file.
 // Returns whether the class can handle the format of the given file.
@@ -122,7 +123,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
 
 
     else if ((!extension.length() || checkSig) && pIOHandler)   {
     else if ((!extension.length() || checkSig) && pIOHandler)   {
         // note: this won't catch compressed files
         // note: this won't catch compressed files
-        return SearchFileHeaderForToken(pIOHandler,pFile, Tokens,1);
+        return SearchFileHeaderForToken(pIOHandler,pFile, TokensForSearch,1);
     }
     }
     return false;
     return false;
 }
 }

+ 1 - 1
code/RemoveVCProcess.cpp

@@ -306,7 +306,7 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
         if (!pMesh->mColors[i])break;
         if (!pMesh->mColors[i])break;
         if (configDeleteFlags & aiComponent_COLORSn(i) || b)
         if (configDeleteFlags & aiComponent_COLORSn(i) || b)
         {
         {
-            delete pMesh->mColors[i];
+            delete [] pMesh->mColors[i];
             pMesh->mColors[i] = NULL;
             pMesh->mColors[i] = NULL;
             ret = true;
             ret = true;
 
 

+ 0 - 2
test/unit/utRemoveVCProcess.cpp

@@ -72,6 +72,4 @@ TEST_F( utRevmoveVCProcess, issue1266_ProcessMeshTest_NoCrash ) {
     scene->mMeshes[ 0 ] = mesh;
     scene->mMeshes[ 0 ] = mesh;
     RemoveVCProcess *process = new RemoveVCProcess;
     RemoveVCProcess *process = new RemoveVCProcess;
     process->Execute( scene );
     process->Execute( scene );
-
-
 }
 }