[gnome-music/wip/mschraal/albumwidget-search-crash] albumwidget: Fix crash on switch back from search
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/albumwidget-search-crash] albumwidget: Fix crash on switch back from search
- Date: Thu, 17 Oct 2019 21:23:24 +0000 (UTC)
commit 05b1033500c172269e552dcd5d28d289bf6b539a
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Oct 17 23:10:34 2019 +0200
albumwidget: Fix crash on switch back from search
When switching back from search view Music crashes, because it does not
receive the expected CoreAlbum from the 'album' property of AlbumWidget.
This is probably fall-out from the core rewrite: AlbumsView expects a
CoreAlbum, AlbumWidget supplies a Grl.Media.
Have the 'album' property return a CoreAlbum instead.
gnomemusic/widgets/albumwidget.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index ac1c661a..0c951bb2 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -44,7 +44,6 @@ class AlbumWidget(Gtk.EventBox):
"""
super().__init__()
- self._album = None
self._corealbum = None
self._duration_signal_id = None
self._model_signal_id = None
@@ -80,7 +79,6 @@ class AlbumWidget(Gtk.EventBox):
self._set_composer_label(corealbum)
- self._album = self._corealbum.props.media
self._album_model = self._corealbum.props.model
self._model_signal_id = self._album_model.connect_after(
"items-changed", self._on_model_items_changed)
@@ -188,6 +186,6 @@ class AlbumWidget(Gtk.EventBox):
"""Get the current album.
:returns: the current album
- :rtype: Grl.Media
+ :rtype: CoreAlbum
"""
- return self._album
+ return self._corealbum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]