diff --git a/Source/Engine/Content/Assets/Model.cpp b/Source/Engine/Content/Assets/Model.cpp index 97036f1b0..53deea428 100644 --- a/Source/Engine/Content/Assets/Model.cpp +++ b/Source/Engine/Content/Assets/Model.cpp @@ -125,8 +125,6 @@ Model::Model(const SpawnParams& params, const AssetInfo* info) Model::~Model() { - // Ensure to be fully disposed - ASSERT(IsInitialized() == false); ASSERT(_streamingTask == nullptr); } diff --git a/Source/Engine/Content/Assets/SkinnedModel.cpp b/Source/Engine/Content/Assets/SkinnedModel.cpp index 095076926..210339749 100644 --- a/Source/Engine/Content/Assets/SkinnedModel.cpp +++ b/Source/Engine/Content/Assets/SkinnedModel.cpp @@ -118,8 +118,6 @@ SkinnedModel::SkinnedModel(const SpawnParams& params, const AssetInfo* info) SkinnedModel::~SkinnedModel() { - // Ensure to be fully disposed - ASSERT(IsInitialized() == false); ASSERT(_streamingTask == nullptr); } diff --git a/Source/Engine/Graphics/Models/Mesh.h b/Source/Engine/Graphics/Models/Mesh.h index efeb5cfd8..37965a8e3 100644 --- a/Source/Engine/Graphics/Models/Mesh.h +++ b/Source/Engine/Graphics/Models/Mesh.h @@ -24,8 +24,8 @@ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(Mesh, MeshBase); protected: bool _hasLightmapUVs; - GPUBuffer* _vertexBuffers[3]; - GPUBuffer* _indexBuffer; + GPUBuffer* _vertexBuffers[3] = {}; + GPUBuffer* _indexBuffer = nullptr; #if USE_PRECISE_MESH_INTERSECTS CollisionProxy _collisionProxy; #endif diff --git a/Source/Engine/Graphics/Models/SkinnedMesh.h b/Source/Engine/Graphics/Models/SkinnedMesh.h index a337fbd98..294428f52 100644 --- a/Source/Engine/Graphics/Models/SkinnedMesh.h +++ b/Source/Engine/Graphics/Models/SkinnedMesh.h @@ -19,8 +19,8 @@ API_CLASS(NoSpawn) class FLAXENGINE_API SkinnedMesh : public MeshBase DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedMesh, MeshBase); protected: - GPUBuffer* _vertexBuffer; - GPUBuffer* _indexBuffer; + GPUBuffer* _vertexBuffer = nullptr; + GPUBuffer* _indexBuffer = nullptr; mutable Array _cachedIndexBuffer; mutable Array _cachedVertexBuffer; mutable int32 _cachedIndexBufferCount;