[vlc-commits] [Git][videolan/vlc][master] qml/PlayerControlLayout: Ensure loader items are valid
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Apr 20 14:42:27 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
6ff93524 by Benjamin Arnaud at 2023-04-20T14:15:56+00:00
qml/PlayerControlLayout: Ensure loader items are valid
- - - - -
1 changed file:
- modules/gui/qt/player/qml/PlayerControlLayout.qml
Changes:
=====================================
modules/gui/qt/player/qml/PlayerControlLayout.qml
=====================================
@@ -104,7 +104,12 @@ FocusScope {
loaderRight.width = Math.round(size * (implicitRight / total))
- var contentWidth = loaderRight.item.contentWidth
+ item = loaderRight.item
+
+ if (item === null)
+ return
+
+ var contentWidth = item.contentWidth
// NOTE: We assign the remaining width based on the contentWidth.
if (contentWidth)
@@ -114,7 +119,12 @@ FocusScope {
} else {
loaderLeft.width = Math.round(size * (implicitLeft / total))
- var contentWidth = loaderLeft.item.contentWidth
+ item = loaderLeft.item
+
+ if (item === null)
+ return
+
+ var contentWidth = item.contentWidth
// NOTE: We assign the remaining width based on the contentWidth.
if (contentWidth)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6ff93524414d36a2a7f08d5eef43698a160a9544
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6ff93524414d36a2a7f08d5eef43698a160a9544
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list