1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-23 01:44:22 +00:00

Make sure to not remove a native component twice

Fixes #88
This commit is contained in:
hogliux 2016-08-08 18:44:01 +01:00
parent 99186e5166
commit 89d938dd3a

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;
} }
} }