summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-28 13:48:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-28 14:30:42 +0000
commit40c78e72656f5373c72bc725724071295c36fd62 (patch)
tree78bf5392db12e4a4f9f3c477d885529fa76e3044 /sd
parent50d5bd90e007ecc9c826ce2499120e15cc4e3a5c (diff)
coverity#705872 Dereference before null check
Change-Id: Ia964362f757372862b3f2e5a0a9581171616251b
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/PresentationViewShellBase.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx
index 05d5228a478c..f0e1f52e2302 100644
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -69,18 +69,15 @@ PresentationViewShellBase::PresentationViewShellBase (
: ViewShellBase (_pFrame, pOldShell)
{
// Hide the automatic (non-context sensitive) tool bars.
- if (_pFrame!=NULL)
+ Reference<beans::XPropertySet> xFrameSet (
+ _pFrame->GetFrame().GetFrameInterface(),
+ UNO_QUERY);
+ if (xFrameSet.is())
{
- Reference<beans::XPropertySet> xFrameSet (
- _pFrame->GetFrame().GetFrameInterface(),
- UNO_QUERY);
- if (xFrameSet.is())
+ Reference<beans::XPropertySet> xLayouterSet(xFrameSet->getPropertyValue("LayoutManager"), UNO_QUERY);
+ if (xLayouterSet.is())
{
- Reference<beans::XPropertySet> xLayouterSet(xFrameSet->getPropertyValue("LayoutManager"), UNO_QUERY);
- if (xLayouterSet.is())
- {
- xLayouterSet->setPropertyValue("AutomaticToolbars", makeAny(sal_False));
- }
+ xLayouterSet->setPropertyValue("AutomaticToolbars", makeAny(sal_False));
}
}
}