[clementine] Fix a possible crash when an album cover search times out RHBZ#797451

Orcan Ogetbil oget at fedoraproject.org
Sun Feb 26 16:47:52 UTC 2012


commit 1a7a29dff9b11fcd5de75049a48dbba6f56bcb02
Author: Orcan Ogetbil <oget.fedora at gmail.com>
Date:   Sun Feb 26 11:47:51 2012 -0500

    Fix a possible crash when an album cover search times out RHBZ#797451

 clementine-fix-albumcoverfetch-crash.patch |   20 ++++++++++++++++++++
 clementine.spec                            |   10 +++++++++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/clementine-fix-albumcoverfetch-crash.patch b/clementine-fix-albumcoverfetch-crash.patch
new file mode 100644
index 0000000..63e164a
--- /dev/null
+++ b/clementine-fix-albumcoverfetch-crash.patch
@@ -0,0 +1,20 @@
+diff -rupN clementine-1.0.1.old/src/covers/albumcoverfetcher.cpp clementine-1.0.1/src/covers/albumcoverfetcher.cpp
+--- clementine-1.0.1.old/src/covers/albumcoverfetcher.cpp	2011-12-02 16:24:44.000000000 -0500
++++ clementine-1.0.1/src/covers/albumcoverfetcher.cpp	2012-02-26 11:37:56.351044572 -0500
+@@ -108,12 +108,16 @@ void AlbumCoverFetcher::StartRequests()
+ 
+ void AlbumCoverFetcher::SingleSearchFinished(quint64 request_id, CoverSearchResults results) {
+   AlbumCoverFetcherSearch* search = active_requests_.take(request_id);
++  if (!search)
++    return;
+   search->deleteLater();
+   emit SearchFinished(request_id, results, search->statistics());
+ }
+ 
+ void AlbumCoverFetcher::SingleCoverFetched(quint64 request_id, const QImage& image) {
+   AlbumCoverFetcherSearch* search = active_requests_.take(request_id);
++  if (!search)
++    return;
+   search->deleteLater();
+   emit AlbumCoverFetched(request_id, image, search->statistics());
+ }
diff --git a/clementine.spec b/clementine.spec
index 14276a7..d1a5150 100644
--- a/clementine.spec
+++ b/clementine.spec
@@ -1,6 +1,6 @@
 Name:           clementine
 Version:        1.0.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A music player and library organizer
 
 Group:          Applications/Multimedia
@@ -16,6 +16,10 @@ Patch0:         clementine-system-sha2.patch
 Patch1:         clementine-desktop.patch
 # Fixes startup on a fresh install. From upstream trunk
 Patch2:         clementine-fresh-start.patch
+# Fix a possible crash when an album cover search times out at the same time that
+# it's cancelled or finishes normally.  Fixes RHBZ#797451
+# http://code.google.com/p/clementine-player/issues/detail?id=2752
+Patch3:         clementine-fix-albumcoverfetch-crash.patch
 
 
 BuildRequires:  boost-devel
@@ -70,6 +74,7 @@ music.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # Remove all 3rdparty libraries exceph universalchardet
 # as it is not available as a separate library.
@@ -143,6 +148,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %endif
 
 %changelog
+* Sun Feb 26 2012 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.1-3
+- Fix a possible crash when an album cover search times out RHBZ#797451
+
 * Thu Feb 07 2012 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.1-2
 - Re-add the fresh start patch. Looks like it didn't make it to 1.0.1
 - Include plasma addon only in F-17+


More information about the scm-commits mailing list