[Konversation-devel] [Bug 100432] closing by CTRL+W crashes when no
tabs are open
Peter Simonsson
psn at linux.se
Mon Feb 28 14:17:45 CET 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=100432
psn linux se changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From psn linux se 2005-02-28 14:17 -------
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());
+ }
}
More information about the Konversation-devel
mailing list