diff options
Diffstat (limited to 'Frameworks/PSMTabBar')
-rw-r--r-- | Frameworks/PSMTabBar/PSMTabBarControl.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index e9fc6c8b..18b5a296 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -1912,11 +1912,14 @@ while ( (cell = [e nextObject]) ) { //remove the observer binding if ([cell representedObject] && ![tabItems containsObject:[cell representedObject]]) { + // see issue #2609 + // -removeTabForCell: comes first to stop the observing that would be triggered in the delegate's call tree + // below and finally caused a crash. + [self removeTabForCell:cell]; + if ([[self delegate] respondsToSelector:@selector(tabView:didCloseTabViewItem:)]) { [[self delegate] tabView:aTabView didCloseTabViewItem:[cell representedObject]]; } - - [self removeTabForCell:cell]; } } |