Skip to content
Verified Commit d7f24a81 authored by Fushan Wen's avatar Fushan Wen
Browse files

applets/mediacontroller: fix potential race in `replaceWhenLoaded()`

There can be a potential race: when the previous player is gone but
the pending image is just ready in time, pendingImage.destroy() -> QQuickImage::deleteLater
so in the event queue statusChanged may be emitted before pendingImage
is deleted, but pendingImage is already set to null when the previous
player is gone.

Fixes "TypeError: Cannot read property 'status' of null" found in CI

See also https://invent.kde.org/qt/qt/qtdeclarative/-/blob/c2031c6153c9625f63bb1091a79317885fae52e2/src/qml/jsruntime/qv4qobjectwrapper.cpp?page=3#L2598
parent 28ced0e1
Pipeline #487367 passed with stage
in 8 minutes and 54 seconds
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