diff --git a/src/apps/terminal/TermWindow.cpp b/src/apps/terminal/TermWindow.cpp index 58bfa5d2c6..913f68f602 100644 --- a/src/apps/terminal/TermWindow.cpp +++ b/src/apps/terminal/TermWindow.cpp @@ -239,7 +239,10 @@ TermWindow::MessageReceived(BMessage *message) // Since the implementation of BTabView uses AddChild/RemoveChild on the // views, the current active tab is the only one who is attached, thus // the only one which could send a message. - delete fTabView->RemoveTab(fTabView->Selection()); + if (fTabView->CountTabs() > 1) + delete fTabView->RemoveTab(fTabView->Selection()); + else + PostMessage(B_QUIT_REQUESTED); break; }