diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index bccd1e88d19..329884b58a7 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -5134,7 +5134,7 @@ QRhiResource::Type QRhiSwapChainRenderTarget::resourceType() const texture->create(); QRhiTextureRenderTarget *rt = rhi->newTextureRenderTarget({ texture }); rp = rt->newCompatibleRenderPassDescriptor(); - rt->setRenderPassDescriptor(rt); + rt->setRenderPassDescriptor(rp); rt->create(); // rt can now be used with beginPass() \endcode