diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 7f0c086cf..3b9c1b67b 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -93,11 +93,11 @@ glTFExporter::glTFExporter(const char* filename, IOSystem* pIOSystem, const aiSc , mScene(pScene) , mProperties(pProperties) { - std::unique_ptr asset(new glTF::Asset(pIOSystem)); - mAsset = asset.get(); + std::unique_ptr asset(); + mAsset.reset( new glTF::Asset( pIOSystem ) ); if (isBinary) { - asset->SetAsBinary(); + mAsset->SetAsBinary(); } ExportMetadata(); diff --git a/code/glTFExporter.h b/code/glTFExporter.h index 884d1fe38..dfd0108b5 100644 --- a/code/glTFExporter.h +++ b/code/glTFExporter.h @@ -46,13 +46,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include + #include #include #include - #include - struct aiScene; struct aiNode; struct aiMaterial; @@ -89,7 +88,7 @@ namespace Assimp std::map mTexturesByPath; - glTF::Asset* mAsset; + std::shared_ptr mAsset; std::vector mBodyData;