diff options
author | Li Xi <lixi@uniontech.com> | 2021-11-11 15:23:04 +0800 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-11-15 16:51:14 +0100 |
commit | a0e7fbd4d54ddbea5c2b155b0f828df3ce3c98fb (patch) | |
tree | aadd9b17f486f6fb90a48c49aec6b675546de639 /src/plugins/sqldrivers/psql/CMakeLists.txt | |
parent | 61aa482241a7e81116224b2a5ae642df49526982 (diff) |
Test result of qobject_cast before dereferencing
Since QMainWindow::setMenuWidget accepts a QWidget (allowing users to
implement their own menu widget), we need to use qobject_cast on the
stored widget to see if it is a QMenuBar before calling QMenuBar APIs.
This qobject_cast may return nullptr.
Pick-to: 6.2
Fixes: QTBUG-98247
Change-Id: Iff1dbd24fa7ca09098fe49c179770356c966251d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/psql/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions