Skip to content

Commit

Permalink
Tools: MeshUpgrader - avoid assertion in ~Mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Apr 8, 2023
1 parent cb1f18f commit c857ae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/MeshUpgrader/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ int main(int numargs, char** args)
auto opts = parseOpts(unOptList, binOptList);

logMgr.setDefaultLog(NULL); // swallow startup messages
DefaultHardwareBufferManager bufferManager; // needed because we don't have a rendersystem
Root root("", "", "");
// get rid of the temporary log as we use the new log now
logMgr.destroyLog("Temporary log");
Expand All @@ -948,7 +949,6 @@ int main(int numargs, char** args)
MeshResourceCreator resCreator;
meshSerializer.setListener(&resCreator);
SkeletonSerializer skeletonSerializer;
DefaultHardwareBufferManager bufferManager; // needed because we don't have a rendersystem
// don't pad during upgrade
MeshManager::getSingleton().setBoundsPaddingFactor(0.0f);

Expand All @@ -968,7 +968,7 @@ int main(int numargs, char** args)
"Unexpected error while reading file " + source, "OgreMeshUpgrader");
fclose( pFile );

MeshPtr meshPtr = MeshManager::getSingleton().createManual("conversion", RGN_DEFAULT);
MeshPtr meshPtr = MeshManager::getSingleton().createManual("TmpConversionMesh", RGN_DEFAULT);
Mesh* mesh = meshPtr.get();

DataStreamPtr stream(memstream);
Expand Down

0 comments on commit c857ae9

Please sign in to comment.