summaryrefslogtreecommitdiff
path: root/externallibrary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externallibrary.cpp')
-rw-r--r--externallibrary.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/externallibrary.cpp b/externallibrary.cpp
index a2e0573a..f1b34f1a 100644
--- a/externallibrary.cpp
+++ b/externallibrary.cpp
@@ -44,7 +44,7 @@ Ref<ProjectFile> ExternalLibrary::GetBackingFile() const
BNProjectFile* file = BNExternalLibraryGetBackingFile(m_object);
if (!file)
return nullptr;
- return new ProjectFile(BNNewProjectFileReference(file));
+ return new ProjectFile(file);
}
@@ -81,7 +81,10 @@ std::optional<std::string> ExternalLocation::GetTargetSymbol()
{
if (BNExternalLocationHasTargetSymbol(m_object))
{
- return BNExternalLocationGetTargetSymbol(m_object);
+ char* sym = BNExternalLocationGetTargetSymbol(m_object);
+ std::string result = sym;
+ BNFreeString(sym);
+ return result;
}
return {};
}