r18334 by jghali - #11612: Crash when exiting story editor

scribus-commit scribus-commit at lists.scribus.net
Thu Jun 20 23:36:04 UTC 2013


Author: jghali
Date: Thu Jun 20 23:36:04 2013
New Revision: 18334

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18334
Log:
#11612: Crash when exiting story editor

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18334&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Jun 20 23:36:04 2013
@@ -17046,9 +17046,11 @@
 							numS->m_counters[l] = numS->m_nums[l].start -1;
 
 				int pos = item->firstInFrame();
+				int last = item->lastInFrame();
+				if (pos > last) continue;
+
 				if ((pos != 0) && (item->itemText.text(pos-1) != SpecialChars::PARSEP))
 					pos = item->itemText.nextParagraph(pos)+1;
-				int last = item->lastInFrame();
 				int len = item->itemText.length();
 				while (pos <= last)
 				{




More information about the scribus-commit mailing list