summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/shells/drwbassh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/shells/drwbassh.cxx')
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index a5a63a6634..d5eec21320 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -836,8 +836,12 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SwFrameFormat* pFrameFormat = FindFrameFormat(pObj);
- SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
- rSet.Put(SfxBoolItem(nWhich, aHOrient.GetHoriOrient() == nHoriOrient));
+ if (pFrameFormat)
+ {
+ SwFormatHoriOrient aHOrient(
+ pFrameFormat->GetFormatAttr(RES_HORI_ORIENT));
+ rSet.Put(SfxBoolItem(nWhich, aHOrient.GetHoriOrient() == nHoriOrient));
+ }
}
if (bVert && !bDisableThis && rMarkList.GetMarkCount() == 1)
@@ -860,8 +864,12 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SwFrameFormat* pFrameFormat = FindFrameFormat(pObj);
- SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
- rSet.Put(SfxBoolItem(nWhich, aVOrient.GetVertOrient() == nVertOrient));
+ if (pFrameFormat)
+ {
+ SwFormatVertOrient aVOrient(
+ pFrameFormat->GetFormatAttr(RES_VERT_ORIENT));
+ rSet.Put(SfxBoolItem(nWhich, aVOrient.GetVertOrient() == nVertOrient));
+ }
}
}
break;