Fix coverity findings: fix possible usage after calling free.

This commit is contained in:
Kim Kulling
2016-08-29 15:28:37 +02:00
parent a66e644bf3
commit 238f14f30f
2 changed files with 5 additions and 6 deletions

View File

@@ -93,11 +93,11 @@ glTFExporter::glTFExporter(const char* filename, IOSystem* pIOSystem, const aiSc
, mScene(pScene)
, mProperties(pProperties)
{
std::unique_ptr<Asset> asset(new glTF::Asset(pIOSystem));
mAsset = asset.get();
std::unique_ptr<Asset> asset();
mAsset.reset( new glTF::Asset( pIOSystem ) );
if (isBinary) {
asset->SetAsBinary();
mAsset->SetAsBinary();
}
ExportMetadata();