Have CPWindow setContentView check that the new view is not the same as the existing content view.

This commit is contained in:
Saikat Chakrabarti
2014-04-02 22:56:22 -07:00
parent bd88b28310
commit fa3f18c88b
+1 -1
View File
@@ -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));