Skip to content

Resource references requires the resource to be already loaded #7

@RodrigoHolztrattner

Description

@RodrigoHolztrattner

When requesting a resource reference, the resource itself must be already loaded, as it can be seen below.

When requesting a reference:
return PacketResourceReferencePtr<ResourceClass>(static_cast<ResourceClass*>(m_ReferenceObject));

Reference constructor:
m_PacketResourceObject->IncrementNumberIndirectReferences();

If the resource is still null or somehow invalid, the reference constructor could cause a crash (or lead into a malformed reference). I need to add support for null resources and some check when creating the reference itself (if the instance isn't ready, create the reference using a null resource).

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions