From f0ceef57b178d4ed71e61a6ce2681f3d401d69fe Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 14 Apr 2009 14:59:30 +0200 Subject: fix potential crash Reviewed-by: Thomas Hartmann need to check for valid menuBar, otherwise dereferencing will horribly fail. --- src/gui/widgets/qmainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v0.12