[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-2/konversation/konversation
From: Peter Simonsson <psn () linux ! se>
Date: 2005-02-28 13:17:34
Message-ID: 20050228131734.83BE2148A2 () office ! kde ! org
[Download RAW message or body]
CVS commit by psn:
Don't crash when trying to close tabs that doesn't exist
BUG:100432
M +10 -4 ledtabwidget.cpp 1.37
--- kdeextragear-2/konversation/konversation/ledtabwidget.cpp #1.36:1.37
@@ -153,9 +153,15 @@ void LedTabWidget::tabClosed(int id)
{
// if id is -1 then get identifier for currently visible tab
- if(id==-1) id=tabBar()->tab(tabBar()->currentTab())->identifier();
+ if(id == -1) {
+ id = tabBar()->currentTab();
+ }
- LedTab* tab=tabBar()->tab(id);
- if(tab==0) kdWarning() << "LedTabWidget::closeTab(): tab==0!" << endl;
- else emit closeTab(tab->getWidget());
+ LedTab* tab = tabBar()->tab(id);
+
+ if(tab == 0) {
+ kdWarning() << "LedTabWidget::closeTab(): tab == 0!" << endl;
+ } else {
+ emit closeTab(tab->getWidget());
+ }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic