From 17adadd166051add81f88643f9192172b367ead6 Mon Sep 17 00:00:00 2001 From: Vincent PINON Date: Fri, 14 Feb 2014 12:51:01 +0100 Subject: [PATCH] fix BUG#3167 crash when updating video thumbs (need confirm?) --- src/kthumb.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kthumb.cpp b/src/kthumb.cpp index 3d660b55..3bf19e28 100644 --- a/src/kthumb.cpp +++ b/src/kthumb.cpp @@ -218,6 +218,10 @@ QImage KThumb::getFrame(Mlt::Frame *frame, int frameWidth, int displayWidth, int if (ow % 2 == 1) ow++; QImage image(ow, oh, QImage::Format_ARGB32_Premultiplied); const uchar* imagedata = frame->get_image(format, ow, oh); + if (imagedata == NULL) { + p.fill(QColor(Qt::red).rgb()); + return p; + } memcpy(image.bits(), imagedata, ow * oh * 4);//.byteCount()); //const uchar* imagedata = frame->get_image(format, ow, oh); -- 2.39.2