From fa3f18c88b59b95ca85f8b583d312a50686fa03a Mon Sep 17 00:00:00 2001 From: Saikat Chakrabarti Date: Wed, 2 Apr 2014 22:56:22 -0700 Subject: [PATCH] Have CPWindow setContentView check that the new view is not the same as the existing content view. --- AppKit/CPWindow/CPWindow.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index a86734ba5..2fc8a9c5c 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1110,7 +1110,7 @@ CPTexturedBackgroundWindowMask */ - (void)setContentView:(CPView)aView { - if (_contentView) + if (_contentView && _contentView !== aView) [_contentView removeFromSuperview]; var bounds = CGRectMake(0.0, 0.0, CGRectGetWidth(_frame), CGRectGetHeight(_frame));