r24109 by jghali - #16282: Spellcheck crash issue
scribus-commit
scribus-commit at lists.scribus.net
Mon Oct 26 21:03:33 UTC 2020
Author: jghali
Date: Mon Oct 26 21:03:33 2020
New Revision: 24109
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24109
Log:
#16282: Spellcheck crash issue
Modified:
trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24109&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldialog.cpp Mon Oct 26 21:03:33 2020
@@ -165,9 +165,12 @@
void HunspellDialog::replaceWord(int i)
{
//TODO: rehyphenate after the replacement
+ QListWidgetItem* suggestionItem = suggestionsListWidget->currentItem();
+ if (!suggestionItem)
+ return;
int replaceStart = m_wfList->at(i).start + m_wfList->at(i).changeOffset;
QString oldText(m_iText->word(replaceStart));
- QString newText(suggestionsListWidget->currentItem()->text());
+ QString newText(suggestionItem->text());
UndoTransaction transaction;
if ((m_item != nullptr) && UndoManager::undoEnabled())
More information about the scribus-commit
mailing list