Summary: | crash when rightclicking a saved playlist in merged view | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Marius <rara> |
Component: | Playlists/Saved Playlists | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bart.cerneels, erbrochendes, galliec, no-spam, o-z, pmdumuid, valorie.zimmerman |
Priority: | NOR | ||
Version: | 2.3-GIT | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.3.0 | |
Attachments: | Picture of where to click to crash amarok |
Description
Marius
2010-02-11 12:11:05 UTC
Confirmed by duplicate *** Bug 226918 has been marked as a duplicate of this bug. *** commit e733faa11f6d10a416ecff6c4f1c8f9d8bb51e37 Author: Bart Cerneels <bart.cerneels@kde.org> Date: Mon Feb 15 10:05:11 2010 +0100 Fixed crash when right clicking on a header BUG:226290 diff --git a/ChangeLog b/ChangeLog index 5e6142d..f169533 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ VERSION 2.3 * Port Copy/Move to Collection actions to the new File Browser. BUGFIXES: + * Fixed crash when right clicking on a header in "saved playlists". (BR 226290) * Fixed bug that prevented files from being deleted from the file browser when performing a Move operation. * Fixed bug in organize collection dialog that used the old %theartist diff --git a/src/browsers/playlistbrowser/UserPlaylistModel.cpp b/src/browsers/playlistbrowser/UserPlaylistModel.cpp index abfccb5..a586972 100644 --- a/src/browsers/playlistbrowser/UserPlaylistModel.cpp +++ b/src/browsers/playlistbrowser/UserPlaylistModel.cpp @@ -733,8 +733,13 @@ PlaylistBrowserNS::UserModel::selectedTracks( const QModelIndexList &list ) Meta::TrackPtr PlaylistBrowserNS::UserModel::trackFromIndex( const QModelIndex &index ) const { - Meta::PlaylistPtr playlist = m_playlists.value( - REMOVE_TRACK_MASK(index.internalId()) ); + if( !index.isValid() ) + return Meta::TrackPtr(); + + Meta::PlaylistPtr playlist = m_playlists.value( REMOVE_TRACK_MASK(index.internalId()) ); + if( playlist.isNull() || playlist->tracks().count() <= index.row() ) + return Meta::TrackPtr(); + return playlist->tracks()[index.row()]; } This fixes the crash part of my report, thank you! For the strange behaviour of "Add To Playlist" I created a new report, because it seems to be unrelated to the crash: bug #226954 *** Bug 226970 has been marked as a duplicate of this bug. *** *** Bug 228000 has been marked as a duplicate of this bug. *** *** Bug 228713 has been marked as a duplicate of this bug. *** I am not sure if this is the same bug or not. I can rightclick on the playlist itself, but not on the .. thing over it. I will upload an picture so you know what i mean. I use 2.3 beta from debian experimental Created attachment 41265 [details]
Picture of where to click to crash amarok
Carlos, are you using a git build of Amarok? You seem to use 2.2.90, which is anterior to this change... Yes, i use 2.2.90. Sorry, my English is not that good, do you mean that those are the same bugs and it is fixed it git? (In reply to comment #11) > Yes, i use 2.2.90. > Sorry, my English is not that good, do you mean that those are the same bugs > and it is fixed it git? Your version did come out before this fix was committed, yes. As to know if you are facing the same bug: it is unlikely, since you do not use the merged view (zusammengefasste Ansicht). FWIW, if a bug states it is about 2.3-git, then it is more recent than your current 2.3 beta version. *** Bug 229499 has been marked as a duplicate of this bug. *** *** Bug 230696 has been marked as a duplicate of this bug. *** |