summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-19 10:00:53 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-19 10:03:01 +0100
commit8f569c740a91b98365dcdaee2444038ce4957a76 (patch)
tree749302d8bf9023ae51873a74dc641fd005744502 /src/gui/opengl
parent465e93aa95d99f799300867b07f81bdd5162c9f1 (diff)
parente8ad49d6cba6521f20b1b08bf65d92fc81c158e4 (diff)
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopengltexture.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 02dee5a90a..6b83c17fd4 100644
--- a/src/gui/opengl/qopengltexture.cpp
+++ b/src/gui/opengl/qopengltexture.cpp
@@ -3222,6 +3222,12 @@ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
qWarning("QOpenGLTexture::setData() requires a valid current context");
return;
}
+
+ if (image.isNull()) {
+ qWarning("QOpenGLTexture::setData() tried to set a null image");
+ return;
+ }
+
if (context->isOpenGLES() && context->format().majorVersion() < 3)
setFormat(QOpenGLTexture::RGBAFormat);
else