Diffusion Juk b93e8cf49bea

search: Fix crash when clicking search playlist after startup.

Authored by mpyne on Feb 15 2020, 2:12 AM.

Description

search: Fix crash when clicking search playlist after startup.

Search playlists that are loaded with JuK on startup (i.e. because they
were saved from a previous JuK invocation) cause a crash as soon as you
click on the playlist after the recent merge request !18 (which
refactors the search-handling code).

The direct cause is that we were passing a pointer to a stack-allocated
object (in the operator>> for SearchPlaylist), which caused a dangling
pointer once the flow of execution left the stack frame. I did not catch
this during the code review, but found a second instance of this in
PlaylistCollection which I've also fixed.

Details

Committed
mpyneFeb 15 2020, 2:12 AM
Parents
R344:11cd23fae431: Merge branch 'searchplaylist-fix' into 'master'
Branches
Unknown
Tags
Unknown