summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmainwindow.cpp
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@nokia.com>2009-04-14 12:59:30 (GMT)
committerMaurice Kalinowski <maurice.kalinowski@nokia.com>2009-04-14 13:00:45 (GMT)
commitf0ceef57b178d4ed71e61a6ce2681f3d401d69fe (patch)
treeec15f39c6de49f4ad2171a6790a6e943480ee9c5 /src/gui/widgets/qmainwindow.cpp
parente2fa120510584327b7e46ff2a4413aa659a5bd65 (diff)
downloadQt-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/widgets/qmainwindow.cpp')
-rw-r--r--src/gui/widgets/qmainwindow.cpp2
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);
}