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

QSharedPointer debug crash if pointer is not assigned

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      All

      Description

      Debug operator for QSharedPointer<T> does not check if it holds a valid pointer, so calling it lead to crash if a pointer is not assigned to it.

      An expected behavior should be printing something like "QSharedPointer(0x0)" like when you try to qDebug() a null pointer QObject or QWidget

       

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            moia Maurizio Ingrassia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes