diff --git a/Cocoa/Document.m b/Cocoa/Document.m index 64e3a215..5e3c5ebc 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -902,7 +902,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) { GB_set_rendering_disabled(&gb, true); _view = nil; - for (NSView *view in _mainWindow.contentView.subviews) { + for (NSView *view in [_mainWindow.contentView.subviews copy]) { [view removeFromSuperview]; } [[NSBundle mainBundle] loadNibNamed:@"GBS" owner:self topLevelObjects:nil];