Skip to content
Snippets Groups Projects
Verified Commit 0a004b87 authored by Joe Donofry's avatar Joe Donofry
Browse files

Fix clipboard image pasting crash on macos

parent 21438819
No related branches found
No related tags found
No related merge requests found
......@@ -370,7 +370,7 @@ FilteredTextEdit::insertFromMimeData(const QMimeData *source)
const auto audio = formats.filter("audio/", Qt::CaseInsensitive);
const auto video = formats.filter("video/", Qt::CaseInsensitive);
if (source->hasImage()) {
if (!image.empty() && source->hasImage()) {
QImage img = qvariant_cast<QImage>(source->imageData());
previewDialog_.setPreview(img, image.front());
} else if (!audio.empty()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment