Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0
-
None
-
a0e7fbd4d54ddbea5c2b155b0f828df3ce3c98fb (qt/qtbase/dev) f9ea9e9b0a57e4b7db929a2b179ba0f3f622431c (qt/qtbase/6.2)
Description
qobject_cast returns null when the parent QWidget object calls the menuBar() interface, causing the null pointer to crash
void tst_QMenuBar::callMenuBarCrashedAfterSetMenuWidget() { QMainWindow w; w.setMenuWidget(new QWidget); QVERIFY(w.menuBar()); }
Attachments
For Gerrit Dashboard: QTBUG-98247 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
380906,12 | Test result of qobject_cast before dereferencing | dev | qt/qtbase | Status: MERGED | +2 | 0 |
381409,2 | Test result of qobject_cast before dereferencing | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |