Browse Source

Make sure to not remove a native component twice

Fixes #88
tags/2021-05-28
hogliux 8 years ago
parent
commit
89d938dd3a
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm

+ 4
- 2
modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm View File

@@ -199,10 +199,12 @@ void NSViewComponent::setView (void* const view)
{ {
if (view != getView()) if (view != getView())
{ {
attachment = nullptr;
ReferenceCountedObject* object = nullptr;
if (view != nullptr) if (view != nullptr)
attachment = attachViewToComponent (*this, view);
object = attachViewToComponent (*this, view);
attachment = object;
} }
} }


Loading…
Cancel
Save