aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPWindowController.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index 23b1bc9b..47f4d7fa 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -281,7 +281,12 @@
*/
- (NSString *)tabView:(NSTabView *)aTabView toolTipForTabViewItem:(NSTabViewItem *)tabViewItem
{
- PSMTabBarCell *theCell = [[tabBar cells] objectAtIndex:[tabView indexOfTabViewItem:tabViewItem]];
+
+ NSInteger tabIndex = [tabView indexOfTabViewItem:tabViewItem];
+
+ if([[tabBar cells] count] < tabIndex) return @"";
+
+ PSMTabBarCell *theCell = [[tabBar cells] objectAtIndex:tabIndex];
// If cell is selected show tooltip if truncated only
if([theCell tabState] & PSMTab_SelectedMask) {