Details
Description
We have been getting crash reports with our application over the last year or so, with crashes in QMenu::copyActionToPlatformItem. The different versions of the application have been built with 5.2.1 and 5.3.1.
These crashes are not very common, and we have not been able to reproduce them in house.
In every case a QAction is updating either its enabled or checked property. This notifies a QMenu via actionEvent(QActionEvent*), and then this crashes when calling copyActionToPlatformItem. Apparently the d->platformMenu->menuItemForTag is returning NULL.
We can fix this crash by checking for NULL. However, it would be good to figure out how this situation happens.
Attachments
For Gerrit Dashboard: QTBUG-42327 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
98897,2 | QMenu check for null result from QPlatformMenu::menuItemForTag | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |
98995,1 | QMenu check for null result from QPlatformMenu::menuItemForTag | 5.3 | qt/qtbase | Status: ABANDONED | 0 | 0 |