Skip to content

Commit

Permalink
Make sure to not remove a native component twice
Browse files Browse the repository at this point in the history
Fixes #88
  • Loading branch information
hogliux committed Aug 8, 2016
1 parent 99186e5 commit 89d938d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm
Expand Up @@ -199,10 +199,12 @@ void removeFromParent()
{
if (view != getView())
{
attachment = nullptr;
ReferenceCountedObject* object = nullptr;

if (view != nullptr)
attachment = attachViewToComponent (*this, view);
object = attachViewToComponent (*this, view);

attachment = object;
}
}

Expand Down

0 comments on commit 89d938d

Please sign in to comment.