Fix clipboard image pasting crash on macos
This commit is contained in:
parent
2143881997
commit
0a004b87de
@ -370,7 +370,7 @@ FilteredTextEdit::insertFromMimeData(const QMimeData *source)
|
|||||||
const auto audio = formats.filter("audio/", Qt::CaseInsensitive);
|
const auto audio = formats.filter("audio/", Qt::CaseInsensitive);
|
||||||
const auto video = formats.filter("video/", 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());
|
QImage img = qvariant_cast<QImage>(source->imageData());
|
||||||
previewDialog_.setPreview(img, image.front());
|
previewDialog_.setPreview(img, image.front());
|
||||||
} else if (!audio.empty()) {
|
} else if (!audio.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user