diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-08 14:46:41 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-05-08 14:48:18 (GMT) |
commit | 6fdff777765c93996b7de9fc36c0de7ff4928102 (patch) | |
tree | 8c536eaf20157a779ab6bc47d413e0f8ae8a1275 /src/gui/widgets/qmenubar.cpp | |
parent | 4af30f47c37fd0e6826aca2984dd0f567dc7e465 (diff) | |
download | Qt-6fdff777765c93996b7de9fc36c0de7ff4928102.zip Qt-6fdff777765c93996b7de9fc36c0de7ff4928102.tar.gz Qt-6fdff777765c93996b7de9fc36c0de7ff4928102.tar.bz2 |
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.
Diffstat (limited to 'src/gui/widgets/qmenubar.cpp')
-rw-r--r-- | src/gui/widgets/qmenubar.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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) |