diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-16 22:24:10 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-16 20:32:41 -0800 |
commit | 5058d8914a95794312e4577bdf3a226525dfafc3 (patch) | |
tree | 75cfe55ffc7accdc8ccf88e80dd03aaa7be054b6 /qt-ui/profilegraphics.cpp | |
parent | 7e9a7b6223990d5431a6177f3ccbabfac0c95bdb (diff) | |
download | subsurface-5058d8914a95794312e4577bdf3a226525dfafc3.tar.gz |
Fix a crash with trying to show the tooltip on the profile.
Fixed a crash with trying to show the tooltip on the profile,
with an empty profile. Since the widgets are not created yet,
we got a crash trying to access the toolBarProxy.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 9e3db2d85..436d3af15 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -139,7 +139,7 @@ bool ProfileGraphicsView::eventFilter(QObject* obj, QEvent* event) // This will "Eat" the default tooltip behavior if it is not on the toolBar. if (event->type() == QEvent::GraphicsSceneHelp) { - if(!toolBarProxy->geometry().contains(mapFromGlobal(QCursor::pos()))){ + if(toolBarProxy && !toolBarProxy->geometry().contains(mapFromGlobal(QCursor::pos()))){ event->ignore(); return true; } |