mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
macOS: Fix for random srashes when using the edit book tool on Mojave. Fixes #1805521 [e-book edit (3.34.0) repeatedly crashes when editing an epub file](https://bugs.launchpad.net/calibre/+bug/1805521)
This commit is contained in:
parent
8d65b78abe
commit
fdcd6d746c
@ -73,6 +73,7 @@ if _speedup is not None:
|
|||||||
def spell_property(sfmt, locale):
|
def spell_property(sfmt, locale):
|
||||||
s = QTextCharFormat(sfmt)
|
s = QTextCharFormat(sfmt)
|
||||||
s.setProperty(SPELL_LOCALE_PROPERTY, locale)
|
s.setProperty(SPELL_LOCALE_PROPERTY, locale)
|
||||||
|
s.mem = locale # ensure locale is not garbage collected
|
||||||
return s
|
return s
|
||||||
_speedup.init(spell_property, dictionaries.recognized, split_into_words_and_positions)
|
_speedup.init(spell_property, dictionaries.recognized, split_into_words_and_positions)
|
||||||
del spell_property
|
del spell_property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user