[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/akregator/src
From:       Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date:       2009-12-05 20:09:40
Message-ID: 1260043780.402566.11981.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1059101 by osterfeld:

merge from 4.3 branch
------------------------------------------------------------------------
r1002704 | osterfeld | 2009-07-26 22:16:37 +0200 (Sun, 26 Jul 2009) | 2 lines

be more defensive when it comes to null articles
BUG:201291
------------------------------------------------------------------------


 M  +3 -2      mainwidget.cpp  
 M  +3 -0      selectioncontroller.cpp  


--- trunk/KDE/kdepim/akregator/src/mainwidget.cpp #1059100:1059101
@@ -948,7 +948,7 @@
     if ( m_viewMode == CombinedView )
         return;
 
-    QList<Article> articles = m_selectionController->selectedArticles();
+    const QList<Article> articles = m_selectionController->selectedArticles();
 
     QString msg;
     switch (articles.count())
@@ -978,7 +978,8 @@
     Q_FOREACH( const Akregator::Article& i, articles )
     {
         Feed* const feed = i.feed();
-        assert( feed );
+        if ( !feed )
+            continue;
         const Akregator::ArticleId aid = { feed->xmlUrl(), i.guid() };
         job->appendArticleId( aid );
     }
--- trunk/KDE/kdepim/akregator/src/selectioncontroller.cpp #1059100:1059101
@@ -58,6 +58,9 @@
         QList<Akregator::Article> articles;
         Q_FOREACH ( const QModelIndex& i, indexes )
         {
+            const Article a = articleForIndex( i, feedList );
+            if ( a.isNull() )
+                continue;
             articles.append( articleForIndex( i, feedList ) );
         }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic