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
Please register or sign in to comment