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

No check whether a qobject_cast has worked in QWaylandQuickItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12, 5.15, 6.7, 6.8
    • Wayland Compositor
    • None
    • Linux/Wayland, Linux/X11

    Description

      In qwaylandquickitem.cpp there is a cast:

      QWaylandQuickOutput *currentOutput = qobject_cast<QWaylandQuickOutput *>(view()->output()); 

      It is not guaranteed that the current output is QWaylandQuickOutput, it is also conceivable that it is a QWaylandOutput. At this point, at least a check plus a warning with a reference to a QWaylandQuickOutput should be issued, as otherwise a crash will occur in the next lines. 

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            julianc Julian Albrecht
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes