diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-30 21:27:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-30 21:27:56 +0000 |
commit | dec950dc4761c1c2f0cf27b20d70f5a0db44d602 (patch) | |
tree | d5823aa51c16d2e02546d04a791e518d0ed92269 /svtools/source | |
parent | d58d20d43ac14a835fad80a5cc7f33ea48c9aa28 (diff) |
coverity#1267679 Dereference before null check
Change-Id: Ic3487f204a0a3f826cf6a2441b5c410a8fc1b0b6
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/accessibleruler.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx index 493ccc8beed4..fe7e43c6634f 100644 --- a/svtools/source/control/accessibleruler.cxx +++ b/svtools/source/control/accessibleruler.cxx @@ -222,14 +222,11 @@ uno::Reference< XAccessibleStateSet > SAL_CALL SvtRulerAccessible::getAccessible if( isVisible() ) pStateSetHelper->AddState( AccessibleStateType::VISIBLE ); + if ( mpRepr->GetStyle() & WB_HORZ ) + pStateSetHelper->AddState( AccessibleStateType::HORIZONTAL ); + else + pStateSetHelper->AddState( AccessibleStateType::VERTICAL ); - if ( mpRepr ) - { - if ( mpRepr->GetStyle() & WB_HORZ ) - pStateSetHelper->AddState( AccessibleStateType::HORIZONTAL ); - else - pStateSetHelper->AddState( AccessibleStateType::VERTICAL ); - } if(pStateSetHelper->contains(AccessibleStateType::FOCUSABLE)) { pStateSetHelper->RemoveState( AccessibleStateType::FOCUSABLE ); |