author | zautrix <zautrix> | 2004-07-06 15:55:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-06 15:55:15 (UTC) |
commit | 45e2744074e876a74919b340efc320bdadadcb25 (patch) (side-by-side diff) | |
tree | 5fac15064970f378dc59284b451491d924c7e5b2 | |
parent | 60ec860b41d2af2444955e5cc3d04d132c76dbbb (diff) | |
download | kdepimpi-45e2744074e876a74919b340efc320bdadadcb25.zip kdepimpi-45e2744074e876a74919b340efc320bdadadcb25.tar.gz kdepimpi-45e2744074e876a74919b340efc320bdadadcb25.tar.bz2 |
Fixed a crash
-rw-r--r-- | kaddressbook/kabcore.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 7cba9aa..3ae23e8 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -765,17 +765,17 @@ void KABCore::contactModified( const KABC::Addressee &addr ) UndoStack::instance()->push( command ); RedoStack::instance()->clear(); setModified( true ); } void KABCore::newContact() { - AddresseeEditorDialog *dialog = 0; + QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); QPtrList<KRES::Resource> kresResources; QPtrListIterator<KABC::Resource> it( kabcResources ); KABC::Resource *resource; while ( ( resource = it.current() ) != 0 ) { ++it; @@ -788,24 +788,23 @@ void KABCore::newContact() KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); resource = static_cast<KABC::Resource*>( res ); if ( resource ) { KABC::Addressee addr; addr.setResource( resource ); mEditorDialog->setAddressee( addr ); - KApplication::execDialog ( mEditorDialog ); + KApplication::execDialog ( mEditorDialog ); } else return; // mEditorDict.insert( dialog->addressee().uid(), dialog ); - dialog->show(); } void KABCore::addEmail( QString aStr ) { #ifndef KAB_EMBEDDED QString fullName, email; |