[Digikam-devel] [Bug 124199] digikam crashed when I right-clicked in the (empty) "My Albums" view

Marcel Wiesweg marcel.wiesweg at gmx.de
Sun Jul 16 22:47:12 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=124199         
marcel.wiesweg gmx de changed:

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



------- Additional Comments From marcel.wiesweg gmx de  2006-07-16 23:47 -------
SVN commit 563173 by mwiesweg:

Add a null pointer check.
I cannot reproduce the crash, but it is ok to add a null pointer check here.

BuG: 124199


 M  +8 -5      albumiconview.cpp  


--- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #563172:563173
 @ -450,25 +450,28  @
 
 void AlbumIconView::slotRightButtonClicked(const QPoint& pos)
 {
-    if(d->currentAlbum->isRoot() ||
+    if (!d->currentAlbum)
+        return;
+
+    if (d->currentAlbum->isRoot() ||
          (   d->currentAlbum->type() != Album::PHYSICAL
           && d->currentAlbum->type() != Album::TAG))
     {
         return;
     }
-            
+
     QPopupMenu popmenu(this);
     KAction *paste = KStdAction::paste(this, SLOT(slotPaste()), 0);
     QMimeSource *data = kapp->clipboard()->data(QClipboard::Clipboard);
-    
+
     if(!data || !QUriDrag::canDecode(data))
     {
         paste->setEnabled(false);
     }
-    
+
     paste->plug(&popmenu);
     popmenu.exec(pos);
-    delete paste;    
+    delete paste;
 }
 
 void AlbumIconView::slotRightButtonClicked(IconItem *item, const QPoint& pos)



More information about the Digikam-devel mailing list