Merge pull request #2101 from mockingbird/fix-cpwindow-setcontentview-check

Have CPWindow setContentView check that the new view is not the same as the existing content view
This commit is contained in:
Aparajita Fishman committed 2014-06-22 14:29:36 -04:00
commit cf06686d67
1 file changed
+1 -1
+1 -1
View File
@@ -1131,7 +1131,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));