r19230 by jghali - fix potential crash by assert in StoryText removeChars()
scribus-commit
scribus-commit at lists.scribus.net
Sat Jun 14 23:28:17 UTC 2014
Author: jghali
Date: Sat Jun 14 23:28:16 2014
New Revision: 19230
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19230
Log:
fix potential crash by assert in StoryText removeChars()
Modified:
trunk/Scribus/scribus/text/storytext.cpp
Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19230&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp (original)
+++ trunk/Scribus/scribus/text/storytext.cpp Sat Jun 14 23:28:16 2014
@@ -458,7 +458,8 @@
if (posCount > 0)
{
ParagraphStyle pst = paragraphStyle(pos);
- removeChars(pos+1, posCount-1);
+ if (posCount > 1)
+ removeChars(pos+1, posCount-1);
applyStyle(pos, pst);
}
}
More information about the scribus-commit
mailing list