diff options
author | Maurice Kalinowski <maurice.kalinowski@nokia.com> | 2009-04-14 12:59:30 (GMT) |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@nokia.com> | 2009-04-14 13:00:45 (GMT) |
commit | f0ceef57b178d4ed71e61a6ce2681f3d401d69fe (patch) | |
tree | ec15f39c6de49f4ad2171a6790a6e943480ee9c5 /src/gui | |
parent | e2fa120510584327b7e46ff2a4413aa659a5bd65 (diff) | |
download | Qt-f0ceef57b178d4ed71e61a6ce2681f3d401d69fe.zip Qt-f0ceef57b178d4ed71e61a6ce2681f3d401d69fe.tar.gz Qt-f0ceef57b178d4ed71e61a6ce2681f3d401d69fe.tar.bz2 |
fix potential crash
Reviewed-by: Thomas Hartmann
need to check for valid menuBar, otherwise dereferencing will
horribly fail.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qmainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 46d6471..2abc9e8 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -481,7 +481,7 @@ void QMainWindow::setMenuBar(QMenuBar *menuBar) oldMenuBar->deleteLater(); } #ifdef Q_OS_WINCE - if (menuBar->size().height() > 0) + if (menuBar && menuBar->size().height() > 0) #endif d->layout->setMenuBar(menuBar); } |