Skip to content
  • Michael Pyne's avatar
    dynamicplaylist: Ensure subclasses handle virtual calls in dtor. · 36581b2b
    Michael Pyne authored
    LGTM points out that DynamicPlaylist's destructor calls a function which
    indirectly leads to a virtual call (updateItems) in a potential subclass
    (SearchPlaylist). By C++ rules, SearchPlaylist has ceased to be a
    SearchPlaylist by the time DynamicPlaylist::~DynamicPlaylist() begins,
    so the virtual call would never actually be dispatched to
    SearchPlaylist.
    
    Fix by having SearchPlaylist do its own updating on destruction.
    36581b2b