Skip to content
Commit a3d378de authored by Matěj Laitl's avatar Matěj Laitl
Browse files

AudioCdCollection: don't create a reference out of temporary var (crashfix)

There's following code in AudioCdCollection::updateProxyTracks():
const QString &urlString = url.url().remove( "audiocd:/" );

Which I think is wrong, because url.url() returns a temporary QString
and QString::remove() returns a reference to itself. However, the
temporary is AFAICS destroyed as soon as this line ends. This IMO
results in urlString being an invalid reference.

I'm not really sure about this, I haven't read C++ spec, but given many
users report crash on the following line, this could be the culprit.
I was never able to reproduce the bug, so I'm shooting blindly.

Reporters, please test reproducibility with current git and reopen if
this is not fixed.

BUG: 256585
FIXED-IN: 2.6
DIGEST: fix grave crash
parent da543740
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