| @@ -177,6 +177,7 @@ public: | |||||
| NSView* const view; | NSView* const view; | ||||
| typedef ReferenceCountedObjectPtr<NSViewAttachment> Ptr; | |||||
| private: | private: | ||||
| Component& owner; | Component& owner; | ||||
| ComponentPeer* currentPeer; | ComponentPeer* currentPeer; | ||||
| @@ -199,10 +200,14 @@ void NSViewComponent::setView (void* const view) | |||||
| { | { | ||||
| if (view != getView()) | if (view != getView()) | ||||
| { | { | ||||
| NSViewAttachment::Ptr old = attachment; | |||||
| attachment = nullptr; | attachment = nullptr; | ||||
| if (view != nullptr) | if (view != nullptr) | ||||
| attachment = attachViewToComponent (*this, view); | attachment = attachViewToComponent (*this, view); | ||||
| old = nullptr; | |||||
| } | } | ||||
| } | } | ||||