Fix crash when model or skinned model loading fails
This commit is contained in:
@@ -125,8 +125,6 @@ Model::Model(const SpawnParams& params, const AssetInfo* info)
|
|||||||
|
|
||||||
Model::~Model()
|
Model::~Model()
|
||||||
{
|
{
|
||||||
// Ensure to be fully disposed
|
|
||||||
ASSERT(IsInitialized() == false);
|
|
||||||
ASSERT(_streamingTask == nullptr);
|
ASSERT(_streamingTask == nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ SkinnedModel::SkinnedModel(const SpawnParams& params, const AssetInfo* info)
|
|||||||
|
|
||||||
SkinnedModel::~SkinnedModel()
|
SkinnedModel::~SkinnedModel()
|
||||||
{
|
{
|
||||||
// Ensure to be fully disposed
|
|
||||||
ASSERT(IsInitialized() == false);
|
|
||||||
ASSERT(_streamingTask == nullptr);
|
ASSERT(_streamingTask == nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(Mesh, MeshBase);
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool _hasLightmapUVs;
|
bool _hasLightmapUVs;
|
||||||
GPUBuffer* _vertexBuffers[3];
|
GPUBuffer* _vertexBuffers[3] = {};
|
||||||
GPUBuffer* _indexBuffer;
|
GPUBuffer* _indexBuffer = nullptr;
|
||||||
#if USE_PRECISE_MESH_INTERSECTS
|
#if USE_PRECISE_MESH_INTERSECTS
|
||||||
CollisionProxy _collisionProxy;
|
CollisionProxy _collisionProxy;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ API_CLASS(NoSpawn) class FLAXENGINE_API SkinnedMesh : public MeshBase
|
|||||||
DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedMesh, MeshBase);
|
DECLARE_SCRIPTING_TYPE_WITH_CONSTRUCTOR_IMPL(SkinnedMesh, MeshBase);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
GPUBuffer* _vertexBuffer;
|
GPUBuffer* _vertexBuffer = nullptr;
|
||||||
GPUBuffer* _indexBuffer;
|
GPUBuffer* _indexBuffer = nullptr;
|
||||||
mutable Array<byte> _cachedIndexBuffer;
|
mutable Array<byte> _cachedIndexBuffer;
|
||||||
mutable Array<byte> _cachedVertexBuffer;
|
mutable Array<byte> _cachedVertexBuffer;
|
||||||
mutable int32 _cachedIndexBufferCount;
|
mutable int32 _cachedIndexBufferCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user