Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19564

QGLSceneNode::setPickNode(QGLPickNode* node) crashed if node == NULL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • Qt3D TP2
    • 4.8.0
    • Qt3D
    • None
    • MacX/Linux

      Hi,

      I am trying to dynamically disable picking via setPickNode(0). Quickly realized it would cause segmentation fault because there's no memory address check in this method:

      @@ -1414,7 +1416,8 @@ void QGLSceneNode::setPickNode(QGLPickNode *node)
           // TODO - resolve recursive picking - not supported by
           // color based pick AFAICT
           d->pickNode = node;
      -    node->setTarget(this);
      +    if(node)
      +       node->setTarget(this);
       }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            z35liu Zheng Liu (closed Nokia identity) (Inactive)
            yutsai Yun-Ta Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes