[gnome-music/wip/mschraal/searchview-crash-3-34] searchview: Fix incorrect object use



commit 8482059d3a371a83dc699c85e1d420a6c4f4bd4f
Author: Atharva Veer <adveer_b17 it vjti ac in>
Date:   Sun May 3 18:36:43 2020 +0530

    searchview: Fix incorrect object use
    
    The artist FlowBox size allocator is incorrectly using the album FlowBox
    object in one location, which in rare occasions can cause a crash.
    
    Use the artist FlowBox object instead.

 gnomemusic/views/searchview.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index ea91711f..9c49d909 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -305,7 +305,7 @@ class SearchView(Gtk.Stack):
         if nb_children == 0:
             return
 
-        first_child = self._album_flowbox.get_child_at_index(0)
+        first_child = self._artist_flowbox.get_child_at_index(0)
         # FIXME: It looks like it is possible that the widget is not
         # yet created, resulting in a crash with first_child being
         # None.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]