Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.4, 6.3.0
-
None
-
effc8be3ce (qt/qtbase/dev) effc8be3ce (qt/tqtc-qtbase/dev) 1871ac7d12 (qt/qtbase/6.4) e044da9d80 (qt/qtbase/6.3) e044da9d80 (qt/tqtc-qtbase/6.3) 1871ac7d12 (qt/tqtc-qtbase/6.4) 92ea1355d3 (qt/tqtc-qtbase/6.2) c6d365f5d5 (qt/tqtc-qtbase/5.15)
Description
Using QStyleSheetStyle::drawPrimitive to draw a QStyle::PE_PanelLineEdit with a nullptr optional widget (i.e. the method default argument for widget parameter) leads to a crash.
I have attached a simple example to demonstrate the crash - this runs fine in Qt 5.15.2, but crashes in Qt 6.2.4 and 6.3.0 (these are the versions I have easily available). The attached example does not attempt to do anything sensible, it is merely a demonstration of the crash; I discovered it in a much more reasonable scenario and have simplified it to make your debugging life easier.
I believe it's because of the change made in QTBUG-95631 to use containerWidget(widget) - there is no null pointer check there.
Attachments
For Gerrit Dashboard: QTBUG-104917 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
423929,2 | Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit) | dev | qt/qtbase | Status: MERGED | +2 | 0 |
423954,2 | Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit) | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
423955,2 | Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit) | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
424016,2 | Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit) | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
436480,4 | Add nullptr guard in QStyleSheetStyle::drawPrimitive(PE_PanelLineEdit) | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |