[Bug 253363] Crash when trying to change the Akregator backend settings if the module is not loaded.

Christophe Giboudeaux cgiboudeaux at gmail.com
Sat Jan 15 14:08:27 GMT 2011


https://bugs.kde.org/show_bug.cgi?id=253363


Christophe Giboudeaux <cgiboudeaux at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #7 from Christophe Giboudeaux <cgiboudeaux gmail com>  2011-01-15 15:08:25 ---
commit 9107d12d0e1e7292c51867368afdedc2cf65fd78
branch master
Author: Christophe Giboudeaux <cgiboudeaux at gmail.com>
Date:   Sat Jan 15 15:06:37 2011 +0100

    Prevent Kontact from crashing when the backends list is not populated yet.
    BUG: 253363
    MERGE: 4.4

diff --git a/akregator/configuration/settings_advanced.cpp
b/akregator/configuration/settings_advanced.cpp
index 7d58031..dda043a 100644
--- a/akregator/configuration/settings_advanced.cpp
+++ b/akregator/configuration/settings_advanced.cpp
@@ -80,9 +80,11 @@ void SettingsAdvanced::selectFactory( const QString& key )
 void SettingsAdvanced::slotConfigureStorage()
 {
     const QString key = cbBackend->itemData( cbBackend->currentIndex()
).toString();
-    Backend::StorageFactory* const factory = m_factories.value( key );
-    assert( factory );
-    factory->configure();
+    if( !key.isEmpty() ) {
+        Backend::StorageFactory* const factory = m_factories.value( key );
+        assert( factory );
+        factory->configure();
+    }
 }

 void SettingsAdvanced::slotFactorySelected( int pos )

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list