Summary: | Crash of Amarok when clicking "ok" with no album cover found | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Mickaël <mprizee> |
Component: | Tools/Cover Manager | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | stuffcorpse |
Priority: | NOR | ||
Version: | 2.4-GIT | ||
Target Milestone: | 2.4.0 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.4 | |
Sentry Crash Report: |
Description
Mickaël
2010-11-28 16:05:59 UTC
Confirmed with latest git Oh, this is actualkly a duplicate of an existing bug. *** This bug has been marked as a duplicate of bug 257454 *** This is not a duplicate of BUG 257454. The stack trace looks quite different. 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() ) |