summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSiteshwar Vashisht <siteshwar@gmail.com>2015-12-15 14:38:12 +0530
committerSiteshwar Vashisht <siteshwar@gmail.com>2015-12-16 06:56:04 +0000
commitadd9875ec266351e7c2878a1e93da34181abab29 (patch)
treec08cb23d11e1834125e05866ecf740bd888452a6 /src
parent80cde7c7ca22511494ae6d32b2023fb1e92ede4d (diff)
downloadqtquickcontrols-add9875ec266351e7c2878a1e93da34181abab29.tar.gz
Check if any menu item is selected when mouse is released
Sometimes I get below error while accessing history menu item in quicknanobrowser : qtbase/qml/QtQuick/Controls/Private/ColumnMenuContent.qml:204: TypeError: Cannot read property '__menuItem' of null Added a check to fix this error Task-number: QTBUG-49968 Change-Id: I934da87fd5f95e40b20dfead81bae68b1415836f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/controls/Private/ColumnMenuContent.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/controls/Private/ColumnMenuContent.qml b/src/controls/Private/ColumnMenuContent.qml
index 4d0f944d..d184524e 100644
--- a/src/controls/Private/ColumnMenuContent.qml
+++ b/src/controls/Private/ColumnMenuContent.qml
@@ -201,7 +201,7 @@ Item {
onPositionChanged: updateCurrentItem({ "x": mouse.x, "y": mouse.y })
onPressed: updateCurrentItem({ "x": mouse.x, "y": mouse.y })
onReleased: {
- if (currentItem.__menuItem.enabled) {
+ if (currentItem && currentItem.__menuItem.enabled) {
if (currentItem.styleData.type === MenuItemType.Menu) {
showCurrentItemSubMenu(true)
} else {