[vlc-commits] qml: fix TypeError in toolbareditor

Fatih Uzunoglu git at videolan.org
Mon Dec 7 10:08:18 UTC 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec  4 02:01:37 2020 +0300| [cf743a416265d505f74e83aaa5fcfd840d35c876] | committer: Pierre Lamot

qml: fix TypeError in toolbareditor

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf743a416265d505f74e83aaa5fcfd840d35c876
---

 modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml | 2 +-
 modules/gui/qt/player/qml/ControlButtons.qml             | 2 +-
 modules/gui/qt/player/qml/LanguageMenu.qml               | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml b/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
index a11f21291a..0f05fbbeea 100644
--- a/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
+++ b/modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
@@ -31,7 +31,7 @@ MouseArea {
     property bool held: false
     property bool dropVisible: false
     property var dndView: null
-    anchors.verticalCenter: parent.verticalCenter
+    anchors.verticalCenter: (!!parent) ? parent.verticalCenter : undefined
     cursorShape: Qt.OpenHandCursor
     drag.target: held ? content : undefined
     width: buttonloader.width
diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlButtons.qml
index 244ee030e9..8e736c894a 100644
--- a/modules/gui/qt/player/qml/ControlButtons.qml
+++ b/modules/gui/qt/player/qml/ControlButtons.qml
@@ -427,7 +427,7 @@ Item{
                 parent: rootPlayer
                 focus: true
                 x: 0
-                y: rootPlayer.positionSliderY - height
+                y: (!!rootPlayer) ? (rootPlayer.positionSliderY - height) : 0
                 z: 1
 
                 onOpened: rootPlayer._menu = langMenu
diff --git a/modules/gui/qt/player/qml/LanguageMenu.qml b/modules/gui/qt/player/qml/LanguageMenu.qml
index 75751a4d44..321419162f 100644
--- a/modules/gui/qt/player/qml/LanguageMenu.qml
+++ b/modules/gui/qt/player/qml/LanguageMenu.qml
@@ -40,7 +40,7 @@ T.Menu {
     cascade: false
     closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape
     height: VLCStyle.dp(296, VLCStyle.scale)
-    width: rootPlayer.width
+    width: (!!rootPlayer) ? rootPlayer.width : 0
 
     onOpened: {
         control._emitMenuClose = true



More information about the vlc-commits mailing list