Skip to content

Commit

Permalink
Merge pull request #14 from CyrilleB79/noNone
Browse files Browse the repository at this point in the history
Do not assign the patched speak function to None
  • Loading branch information
cary-rowen committed Apr 16, 2024
2 parents b631bd8 + e78c3d4 commit feb2d55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/globalPlugins/clipboardEnhancement/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,11 @@ def terminate(self):
self.monitor.Stop()
self.monitor = None
speechModule.speak = self.oldSpeak
self.oldSpeak = None
# Do not set self.oldSpeak to None.
# Since many add-ons can patch speech.speak and since the order in which patching and unpatching is not
# well established, we may end up speech.speak restored to None (e.g. clipboardEnhancement and
# baiduTranslation)
# self.oldSpeak = None
if self.editor:
self.editor.isExit = True
self.editor.Destroy()
Expand Down

0 comments on commit feb2d55

Please sign in to comment.