Fix crash when releasing the scene from timer


There is a crash in scene renderer when releasing the scene resources
from a timer. The scene renderer holds a pointer to the scene root node,
which gets deallocated before the scene renderer gets deallocated. The
scene renderer is using the pointer in it's destructor to remove the
scene root from the layer node, which causes a 'use after dealloc' crash.

Use the winAttacment in the scene renderer destructor to check if the
scene root node is still valid.

Fixes: QTBUG-144311
Pick-to: 6.11
Change-Id: I2a768fb352b229852605b9a861138685238853c2
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
commitb786c3d1bb2461c88037dbb92c2086f818cd486b
parent10a9fa52b1afea3639dd6555798d11bd04203388
authorAntti Määttä <antti.maatta@qt.io>
committerAntti Määttä <antti.maatta@qt.io>
commit timeFri, 6 Mar 2026 09:32:12 +0000