diff options
Diffstat (limited to 'qt-ui/profile/ruleritem.cpp')
-rw-r--r-- | qt-ui/profile/ruleritem.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp index ddd8f4620..d5742ef1d 100644 --- a/qt-ui/profile/ruleritem.cpp +++ b/qt-ui/profile/ruleritem.cpp @@ -83,7 +83,11 @@ void RulerItem2::settingsChanged() ProfileWidget2 *profWidget = NULL; if (scene() && scene()->views().count()) profWidget = qobject_cast<ProfileWidget2 *>(scene()->views().first()); - setVisible(profWidget->currentState == ProfileWidget2::PROFILE ? prefs.rulergraph : false); + + if (profWidget && profWidget->currentState == ProfileWidget2::PROFILE) + setVisible(prefs.rulergraph); + else + setVisible(false); } void RulerItem2::recalculate() |