summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/mainwindow.cpp
authorerik <erik>2007-01-24 19:54:07 (UTC)
committer erik <erik>2007-01-24 19:54:07 (UTC)
commit89e81059e832ff77c2f0ac8b9db12f80eafa03fc (patch) (unidiff)
tree99a130fc643d2aeefdecab452f644e7b61a5f50e /noncore/apps/checkbook/mainwindow.cpp
parent035bbc5bf689839c8d8e7be37f347b0dd900fccf (diff)
downloadopie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.zip
opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.tar.gz
opie-89e81059e832ff77c2f0ac8b9db12f80eafa03fc.tar.bz2
Each file in this commit has an instance where a pointer is checked at
one point in the code and then not checked in another point in the code. If it needed to be checked once, it needs to be checked the other time. If not the application could segfault.
Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp7
1 files changed, 3 insertions, 4 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
@@ -243,6 +243,7 @@ void MainWindow::slotEdit()
243// --- openBook --------------------------------------------------------------- 243// --- openBook ---------------------------------------------------------------
244void MainWindow::openBook(QListViewItem *curritem) 244void MainWindow::openBook(QListViewItem *curritem)
245{ 245{
246 if ( !curritem ) return;
246 // find book in List 247 // find book in List
247 QString currname=curritem->text(posName); 248 QString currname=curritem->text(posName);
248 CBInfo *cb = checkbooks->first(); 249 CBInfo *cb = checkbooks->first();
@@ -277,10 +278,8 @@ void MainWindow::openBook(QListViewItem *curritem)
277 if ( currname != newname ) 278 if ( currname != newname )
278 { 279 {
279 // Update name if changed 280 // Update name if changed
280 if( curritem ) { 281 curritem->setText( posName, newname );
281 curritem->setText( posName, newname ); 282 cbList->sort();
282 cbList->sort();
283 }
284 _cfg.setLastBook( newname ); 283 _cfg.setLastBook( newname );
285 284
286 // Remove old file 285 // Remove old file