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

List:       amarok-bugs-dist
Subject:    [Bug 258187] Crash of Amarok when clicking "ok" with no album cover
From:       "Rick W.Chen" <stuffcorpse () archlinux ! us>
Date:       2010-11-30 21:36:12
Message-ID: 20101130213612.3845776959 () immanuel ! kde ! org
[Download RAW message or body]

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


Rick W. Chen <stuffcorpse@archlinux.us> changed:

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




--- Comment #4 from Rick W. Chen <stuffcorpse archlinux us>  2010-11-30 22:36:11 ---
commit 8ba91b250e0c36e6da3a4e9e1aa26b12dabf0de0
branch master
Author: Rick W. Chen <stuffcorpse@archlinux.us>
Date:   Wed Dec 1 10:12:55 2010 +1300

    Fix cover dialog crash when pressing Ok when nothing is selected

    BUG:258187

diff --git a/ChangeLog b/ChangeLog
index 97e9661..581f47f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,7 @@ VERSION 2.4-Beta 1
       pressing SHIFT while clicking the action will bypass trash.

   BUGFIXES:
+    * Fixed cover dialog crash pressing Ok when nothing is selected. (BR
258187)
     * Title labels incorrectly used the text color from the plasma theme.
       This caused trouble with the fixed plasma theme and light color schemes.
     * Fixed a data-loss bug where the user could lose changes he made to the
current
diff --git a/src/covermanager/CoverFoundDialog.cpp
b/src/covermanager/CoverFoundDialog.cpp
index 36f83cb..e92946e 100644
--- a/src/covermanager/CoverFoundDialog.cpp
+++ b/src/covermanager/CoverFoundDialog.cpp
@@ -423,7 +423,12 @@ void CoverFoundDialog::slotButtonClicked( int button )
 {
     if( button == KDialog::Ok )
     {
-        CoverFoundItem *item = static_cast< CoverFoundItem* >(
m_view->currentItem() );
+        CoverFoundItem *item = dynamic_cast< CoverFoundItem* >(
m_view->currentItem() );
+        if( !item )
+        {
+            reject();
+            return;
+        }

         bool gotBigPix( true );
         if( !item->hasBigPix() )

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Amarok-bugs-dist mailing list
Amarok-bugs-dist@kde.org
https://mail.kde.org/mailman/listinfo/amarok-bugs-dist
[prev in list] [next in list] [prev in thread] [next in thread] 

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