Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/mainwindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index d9e2047..8e2e2e3 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp @@ -240,12 +240,13 @@ void MainWindow::slotEdit() } // --- openBook --------------------------------------------------------------- void MainWindow::openBook(QListViewItem *curritem) { + if ( !curritem ) return; // find book in List QString currname=curritem->text(posName); CBInfo *cb = checkbooks->first(); while ( cb ) { if ( cb->name() == currname ) break; @@ -274,16 +275,14 @@ void MainWindow::openBook(QListViewItem *curritem) if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted ) { QString newname = cb->name(); if ( currname != newname ) { // Update name if changed - if( curritem ) { curritem->setText( posName, newname ); cbList->sort(); - } _cfg.setLastBook( newname ); // Remove old file QFile f( tempFilename ); if ( f.exists() ) f.remove(); |