diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-10-09 10:23:12 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-10-09 17:15:06 +0200 |
commit | b62b80706e6b81cd3b5e18d7ffdac2bc630b151e (patch) | |
tree | d657d952a33801e758032de4abd52f6f522f23d6 /src/gui/rhi | |
parent | df0b1836b5b7c14095258a510ec27758a921eb0a (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')
-rw-r--r-- | src/gui/rhi/qrhinull.cpp | 2 |
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(); |