Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2, 6.5.1
-
None
-
-
63824363a (dev), 1a628e82c (6.6), 95e6b2f2b (tqtc/lts-5.15), 2a2db6352 (6.5)
Description
Straight forward enough, it is possible for QWindowPrivate::create() to fail.
QWindow::winId() doesn't check if it is null
void QWindowPrivate::create(bool recursive, WId nativeHandle) ... if (!platformWindow) { qWarning() << "Failed to create platform window for" << q << "with flags" << q->flags(); return; } WId QWindow::winId() const{ Q_D(const QWindow); if(!d->platformWindow) const_cast<QWindow *>(this)->create(); //No null check return d->platformWindow->winId(); }
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-114613 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
492495,3 | Return 0 in QWindow::winId in case of failed platform window creation | dev | qt/qtbase | Status: MERGED | +2 | 0 |
493042,2 | Return 0 in QWindow::winId in case of failed platform window creation | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
493043,4 | Return 0 in QWindow::winId in case of failed platform window creation | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
493044,4 | Return 0 in QWindow::winId in case of failed platform window creation | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |