mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 17:26:36 -04:00
Merge pull request #274 from dlon/clipboard-crash
Fix crash caused by cutting and copying events that don't modify the clipboard
This commit is contained in:
commit
819637721c
1 changed files with 2 additions and 0 deletions
|
@ -971,6 +971,8 @@ class EditorWebView(AnkiWebView):
|
||||||
# add a comment in the clipboard html so we can tell text is copied
|
# add a comment in the clipboard html so we can tell text is copied
|
||||||
# from us and doesn't need to be stripped
|
# from us and doesn't need to be stripped
|
||||||
clip = self.editor.mw.app.clipboard()
|
clip = self.editor.mw.app.clipboard()
|
||||||
|
if not clip.ownsClipboard():
|
||||||
|
return
|
||||||
mime = clip.mimeData()
|
mime = clip.mimeData()
|
||||||
if not mime.hasHtml():
|
if not mime.hasHtml():
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue