r24907 by jghali - Qt6: fix crash during text editing
scribus-commit
scribus-commit at lists.scribus.net
Fri Feb 4 23:07:04 UTC 2022
Author: jghali
Date: Fri Feb 4 23:07:04 2022
New Revision: 24907
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24907
Log:
Qt6: fix crash during text editing
Modified:
trunk/Scribus/scribus/pageitem_textframe.cpp
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24907&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Fri Feb 4 23:07:04 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