Skip to content
  • Filip Roséen's avatar
    gui/qt: fix crash when sorting playlist · 94feeecd
    Filip Roséen authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    
    
    Close #17023
    
    The problem behind the issue is that the QModelIndex sent
    through "emit currentIndexChanged( ... )" previously referred to an
    AbstractPLItem that is destroyed during the playlist sorting.
    
    This fixes the issue by grabbing the associated input_item_t*
    prior to sorting/destroying the item list, and then conditionally using
    the retrieved handle to construct a new QModelIndex (referring to the
    correct entity), referring to the correct entity within the
    recontrustructed list.
    
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    94feeecd