summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2011-09-21 11:57:47 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-09-21 11:58:01 +0100
commita0b3fc96fe985068fc794646570a0f74568941ec (patch)
treebd323dac2384563e73b51f47d9aa177dd8187160
parentc3fd04cda937b9896b5abe6f32a1de459317e8a5 (diff)
Fix for fdo#35513: avoid crash while processing incorrect range of pages
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
-rw-r--r--sw/source/core/doc/doc.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 0086fc91e1..369594ae10 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1628,7 +1628,10 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
std::vector< sal_Int32 > aPagesToPrint;
StringRangeEnumerator::getRangesFromString(
aPageRange, aPagesToPrint, 1, nDocPageCount, 0 );
-
+
+ if (aPagesToPrint.empty())
+ return;
+
// now fill the vector for calculating the page pairs with the start frames
// from the above obtained vector
std::vector< const SwPageFrm * > aVec;