Skip to content
Commit 0027986c authored by Michael Pyne's avatar Michael Pyne
Browse files

dynamicplaylist: Ensure subclasses handle virtual calls in dtor.

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.

(cherry picked from commit 36581b2b)
parent 6282bbb5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment