summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhinull.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-10-09 10:23:12 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-10-09 17:15:06 +0200
commitb62b80706e6b81cd3b5e18d7ffdac2bc630b151e (patch)
treed657d952a33801e758032de4abd52f6f522f23d6 /src/gui/rhi/qrhinull.cpp
parentdf0b1836b5b7c14095258a510ec27758a921eb0a (diff)
rhi: Autotest for rendering a triangle into a window
Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhinull.cpp')
-rw-r--r--src/gui/rhi/qrhinull.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhinull.cpp b/src/gui/rhi/qrhinull.cpp
index 3027faa397..fe606f971f 100644
--- a/src/gui/rhi/qrhinull.cpp
+++ b/src/gui/rhi/qrhinull.cpp
@@ -489,7 +489,7 @@ void QRhiNull::resourceUpdate(QRhiCommandBuffer *cb, QRhiResourceUpdateBatch *re
quint32 bytesPerLine = 0;
quint32 byteSize = 0;
textureFormatInfo(result->format, result->pixelSize, &bytesPerLine, &byteSize);
- if (result->format == QRhiTexture::RGBA8) {
+ if (texD && texD->format() == QRhiTexture::RGBA8) {
result->data.resize(int(byteSize));
const QImage &src(texD->image[u.rb.layer()][u.rb.level()]);
char *dst = result->data.data();