diff options
| author | Brian Potchik <brian@vector35.com> | 2023-11-16 16:00:37 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2023-11-16 16:00:37 -0500 |
| commit | c798413b1d6625a94d90f1ef56c067370d93bb9f (patch) | |
| tree | cb03df772a8fc87f79ab4b4b6fbc716a51534626 /binaryview.cpp | |
| parent | 4025361513068463390900635313910200542556 (diff) | |
Initial components UI update.
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 7abb01cb..1588d23a 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -3286,7 +3286,11 @@ Ref<Component> BinaryView::CreateComponent(std::string parentGUID) Ref<Component> BinaryView::CreateComponent(Ref<Component> parent) { - auto bnComponent = BNCreateComponentWithParent(m_object, parent->GetGuid().c_str()); + BNComponent* bnComponent; + if (parent) + bnComponent = BNCreateComponentWithParent(m_object, parent->GetGuid().c_str()); + else + bnComponent = BNCreateComponent(m_object); return new Component(bnComponent); } |
