summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com>2015-04-19 18:13:16 +0530
committerMuthu Subramanian <muthu.subramanian.karunanidhi@ericsson.com>2015-04-19 18:13:16 +0530
commit174f205fa24ccf72e9a479d6be901144418f899e (patch)
treeb688eb1c78cc78976cf68eb63fafeb03e4141ae0
parent4950c579d125ed7aa5eecccabe900ce79cd667d1 (diff)
tdf#90357: Fix crash while pasting into draw from impress.
Change-Id: Iff0b072f0968e1e3e54617bd6903019ef3edb1ac
-rw-r--r--sd/source/core/drawdoc3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index ec5416cc1f58..33e457b03cc9 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -929,7 +929,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for(sal_uInt32 p = nInsertPos; p < (nInsertPos + nBMSdPageCount); p++)
{
SdPage *pPg = static_cast<SdPage *>( GetPage(p) );
- for(size_t i = 0; i < pPg->GetObjCount(); ++i)
+ for(size_t i = 0; pPg && (i < pPg->GetObjCount()); ++i)
{
if(pPg->GetObj(i)->GetStyleSheet())
{