[app] Fixed check for null image in setClipboardImage

This commit is contained in:
Slava Monich 2017-10-10 00:52:59 +03:00
parent 53233b17b1
commit 2aa3b9e568

View file

@ -162,12 +162,12 @@ BooksDialogManager::setClipboardText(
void void
BooksDialogManager::setClipboardImage( BooksDialogManager::setClipboardImage(
const ZLImageData &imageData, const ZLImageData& imageData,
ClipboardType type) const ClipboardType type) const
{ {
// May be invoked on non-UI thread // May be invoked on non-UI thread
QImage image(*((const ZLQtImageData&)imageData).image()); QImage image(*((const ZLQtImageData&)imageData).image());
if (image.isNull()) { if (!image.isNull()) {
HDEBUG(image.width() << "x" << image.height()); HDEBUG(image.width() << "x" << image.height());
Q_EMIT copyImageToClipboard(image); Q_EMIT copyImageToClipboard(image);
} }