Skip to content

Commit

Permalink
Fix Resource added to ResourceList without creating UID
Browse files Browse the repository at this point in the history
  • Loading branch information
Benualdo committed Oct 20, 2024
1 parent e957ad3 commit a816497
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/UndoRedo/UndoRedoEntry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace vg::core
if (nullptr != _object)
{
m_objectUID = _object->GetUID(false);
VG_ASSERT(m_objectUID);
VG_ASSERT(m_objectUID, "(%s)\"%s\" has no UID", _object->GetClassName(), _object->GetShortName().c_str());

m_objectName = _object->GetName();
}
Expand Down
1 change: 1 addition & 0 deletions src/engine/Resource/ResourceList.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace vg::engine
bool Add() override
{
T & res = m_resources.emplace_back();
res.RegisterUID();

for (auto & res : m_resources)
res.SetParent(this);
Expand Down

0 comments on commit a816497

Please sign in to comment.