Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Fix unmanaged constructor name failure
Browse files Browse the repository at this point in the history
  • Loading branch information
emesare committed Jan 15, 2024
1 parent e53d786 commit 4c7d949
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/constructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ bool Constructor::IsValid()

std::string Constructor::GetName()
{
return GetRootVirtualFunctionTable()->GetCOLocator()->GetTypeDescriptor().GetDemangledName();
auto coLocator = GetRootVirtualFunctionTable()->GetCOLocator();
if (!coLocator.has_value())
return "Constructor_" + std::to_string(GetRootVirtualFunctionTable()->m_address);
return coLocator->GetTypeDescriptor().GetDemangledName();
}

std::optional<VirtualFunctionTable> Constructor::GetRootVirtualFunctionTable()
Expand Down

0 comments on commit 4c7d949

Please sign in to comment.