From 106134be33e4e96332ce6605f0a8ae79faeda780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Sat, 26 Jan 2019 04:09:29 +0100 Subject: [PATCH] Fix crash caused by cutting and copying --- aqt/editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aqt/editor.py b/aqt/editor.py index d564b2ad5..71af8fde1 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -971,6 +971,8 @@ class EditorWebView(AnkiWebView): # add a comment in the clipboard html so we can tell text is copied # from us and doesn't need to be stripped clip = self.editor.mw.app.clipboard() + if not clip.ownsClipboard(): + return mime = clip.mimeData() if not mime.hasHtml(): return