diff --git a/src/kits/interface/TabView.cpp b/src/kits/interface/TabView.cpp
index 4b0dec7..d1762ed 100644
a
|
b
|
BTabView::RemoveTab(int32 index)
|
1243 | 1243 | else if (index <= fSelection) |
1244 | 1244 | Select(fSelection - 1); |
1245 | 1245 | |
1246 | | if (fFocus == CountTabs() - 1 || CountTabs() == 0) |
1247 | | SetFocusTab(fFocus, false); |
1248 | | else |
1249 | | SetFocusTab(fFocus, true); |
| 1246 | if (fFocus >= 0) { |
| 1247 | if (fFocus == CountTabs() - 1 || CountTabs() == 0) |
| 1248 | SetFocusTab(fFocus, false); |
| 1249 | else |
| 1250 | SetFocusTab(fFocus, true); |
| 1251 | } |
1250 | 1252 | |
1251 | 1253 | return tab; |
1252 | 1254 | } |