summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarlos Manuel Duclos Vergara <carlos.duclos@nokia.com>2010-08-11 13:47:40 (GMT)
committerCarlos Manuel Duclos Vergara <carlos.duclos@nokia.com>2010-08-18 16:04:00 (GMT)
commit8e7fb343372acd0bc5fe04db7a5c5542541d4538 (patch)
treeefe093398dea60e0bc76824ac170b18ea9723dc3 /src
parent041a68007413a20a9a9c97d0f2f04f9e03428f67 (diff)
downloadQt-8e7fb343372acd0bc5fe04db7a5c5542541d4538.zip
Qt-8e7fb343372acd0bc5fe04db7a5c5542541d4538.tar.gz
Qt-8e7fb343372acd0bc5fe04db7a5c5542541d4538.tar.bz2
Crash in QX11PaintEngine::drawPixmap
We receive a pixmap as a const reference and then we convert it to an X11 pixmap. This conversion could fail for many reasons, however we were not looking at the result of this conversion. This patch was contributed by Christoph Feck from KDE. Task-number: QTBUG-12826 Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 910b2df..fecf25f 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1916,6 +1916,8 @@ void QX11PaintEngine::drawPixmap(const QRectF &r, const QPixmap &px, const QRect
int sh = qRound(sr.height());
QPixmap pixmap = qt_toX11Pixmap(px);
+ if(pixmap.isNull())
+ return;
if ((d->xinfo && d->xinfo->screen() != pixmap.x11Info().screen())
|| (pixmap.x11Info().screen() != DefaultScreen(X11->display))) {