r24908 by jghali - Fix potential crash during text editing
scribus-commit
scribus-commit at lists.scribus.net
Fri Feb 4 23:07:42 UTC 2022
Author: jghali
Date: Fri Feb 4 23:07:42 2022
New Revision: 24908
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24908
Log:
Fix potential crash during text editing
Modified:
branches/Version15x/Scribus/scribus/pageitem_textframe.cpp
Modified: branches/Version15x/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24908&path=/branches/Version15x/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/Version15x/Scribus/scribus/pageitem_textframe.cpp (original)
+++ branches/Version15x/Scribus/scribus/pageitem_textframe.cpp Fri Feb 4 23:07:42 2022
@@ -3814,7 +3814,7 @@
if (kk == Qt::Key_Return)
uc = "\r";
#endif
- int as = uc[0].unicode();
+ int as = !uc.isEmpty() ? uc[0].unicode() : 0;
QString Tcha, Twort;
uint Tcoun;
int len, pos;
@@ -4389,7 +4389,7 @@
// view->RefreshItem(this);
doUpdate = true;
}
- else if (uc[0] > QChar(31) || (as == 13) || (as == 30))
+ else if ((as > 31) || (as == 13) || (as == 30))
{
if (UndoManager::undoEnabled())
{
More information about the scribus-commit
mailing list