[vlc-commits] [Git][videolan/vlc][master] qml: fix invalid access
    Felix Paul Kühne (@fkuehne) 
    gitlab at videolan.org
       
    Fri Jul  7 09:09:04 UTC 2023
    
    
  
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
0cf847f0 by Prince Gupta at 2023-07-07T08:50:03+00:00
qml: fix invalid access
fixes warnings
- - - - -
2 changed files:
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/TableViewDelegate.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -206,6 +206,9 @@ T.ItemDelegate {
         onPressed: {
             _modifiersOnLastPress = mouse.modifiers
 
+            if (!drag.target)
+                return
+
             const pos = drag.target.parent.mapFromItem(root, mouseX, mouseY)
             drag.target.x = pos.x + VLCStyle.dragDelta
             drag.target.y = pos.y + VLCStyle.dragDelta
=====================================
modules/gui/qt/widgets/qml/TableViewDelegate.qml
=====================================
@@ -132,6 +132,9 @@ T.Control {
             onPressed: {
                 _modifiersOnLastPress = mouse.modifiers
 
+                if (!drag.target)
+                    return
+
                 const pos = drag.target.parent.mapFromItem(hoverArea, mouseX, mouseY);
 
                 drag.target.x = pos.x + VLCStyle.dragDelta;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0cf847f0bed33b3344e9f3ecb978e019a9c3d56b
-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0cf847f0bed33b3344e9f3ecb978e019a9c3d56b
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