Summary: | [patch] Crash when clicking query similar artists with nothing playing [@ SimilarArtistsApplet::queryForCurrentTrack] | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Tuomas Nurmi <tuomas> |
Component: | Context View/Similar Artists | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | jclavel, lfranchi, schachwhiz |
Priority: | NOR | ||
Version: | 2.4-GIT | ||
Target Milestone: | 2.4.1 | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.4.1 | |
Sentry Crash Report: | |||
Attachments: | Simple patch fixing the crash |
Description
Tuomas Nurmi
2011-01-14 14:25:40 UTC
Created attachment 56006 [details]
Simple patch fixing the crash
Thank you for the patch, Thomas, could you please submit it to http://git.reviewboard.kde.org (you need an identiy on http://identity.kde.org previously)? commit f16f7dab9555afc4bdbad59b3f7555c016eee236 branch master Author: Mark Kretschmann <kretschmann@kde.org> Date: Sun Jan 16 10:17:01 2011 +0100 Fix potential crash with the Similar Artists applet. Thanks to Tuomas Nurmi <tuomas@norsumanageri.org> for the patch. BUG: 263145 diff --git a/ChangeLog b/ChangeLog index 1d9a0c7..70b34aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ VERSION 2.4.1 CHANGES: BUGFIXES: + * Fixed potential crash with the Similar Artists applet. Thanks to + Tuomas Nurmi <tuomas@norsumanageri.org> for the patch. (BR 263145) * Fixed 'Scale Font' option in OSD options for OSD preview widget. (BR 254029) * Fixed issue with playlist tooltips that was shown independetly from diff --git a/src/context/applets/similarartists/SimilarArtistsApplet.cpp b/src/context/applets/similarartists/SimilarArtistsApplet.cpp index b1b340f..c0f6287 100644 --- a/src/context/applets/similarartists/SimilarArtistsApplet.cpp +++ b/src/context/applets/similarartists/SimilarArtistsApplet.cpp @@ -270,6 +270,8 @@ void SimilarArtistsApplet::queryForCurrentTrack() { Meta::TrackPtr track = The::engineController()->currentTrack(); + if( !track ) + return; if( Meta::ArtistPtr artist = track->artist() ) queryArtist( artist->name() ); } *** Bug 279502 has been marked as a duplicate of this bug. *** |