The first time ensureRhi() is called we don't have an RHI yet, and will adopt the top level's repaint manager's RHI. We need to register a cleanup callback for this RHI, so that if it goes away, we will reset our RHI pointer to null, just like when we switch from one top level to another (and get a new potential RHI). Without the reset, we would be working with a stale QRhi pointer, which we in most cases updated via a call to ensureRhi(), that picked up the new QRhi, but for good measure we should reset it if we can. Change-Id: Iac6d8787b636675bbcb4358e8f0baad26187b0e2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 986f8b361ce9d6163f6ef691cad7b2955dcfe5cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%