From 6fdff777765c93996b7de9fc36c0de7ff4928102 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Fri, 8 May 2009 16:46:41 +0200 Subject: Stop a crash in QMenuBar on Designer after my changes. In the past, we checked on the existence of the pointer, but now that this is controlled by the property, we need to also check the pointer in the action event. --- src/gui/widgets/qmenubar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index d4de5bd..d2e6bfb 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -1273,6 +1273,8 @@ void QMenuBar::actionEvent(QActionEvent *e) #else QMenuBarPrivate::QWceMenuBarPrivate *nativeMenuBar = d->wce_menubar; #endif + if (!nativeMenuBar) + return; if(e->type() == QEvent::ActionAdded) nativeMenuBar->addAction(e->action(), nativeMenuBar->findAction(e->before())); else if(e->type() == QEvent::ActionRemoved) -- cgit v0.12