diff --git a/code/glTF2/glTF2Asset.inl b/code/glTF2/glTF2Asset.inl index 0d4de11f2..4cd0f65c0 100644 --- a/code/glTF2/glTF2Asset.inl +++ b/code/glTF2/glTF2Asset.inl @@ -271,7 +271,7 @@ Ref LazyDict::Retrieve(unsigned int i) } // Unique ptr prevents memory leak in case of Read throws an exception - auto inst = std::unique_ptr(); + auto inst = std::unique_ptr(new T()); inst->id = std::string(mDictId) + "_" + to_string(i); inst->oIndex = i; ReadMember(obj, "name", inst->name);