From 0de4e659507ca70d58ad9900760cb90d5bf00a20 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 10 May 2018 16:44:55 +1000 Subject: [PATCH] fix previously pasted image appearing in place of drop/text paste mime.imageData() was returning stale data, and may have been causing crashes as well --- aqt/editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aqt/editor.py b/aqt/editor.py index 365fec598..522c3c1ed 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -906,6 +906,8 @@ class EditorWebView(AnkiWebView): return html, False def _processImage(self, mime): + if not mime.hasImage(): + return im = QImage(mime.imageData()) uname = namedtmp("paste") if self.editor.mw.pm.profile.get("pastePNG", False):