PlatformSurfaceFilter: fix crash when Scene3D is destroyed after window


When closing a window containing a Scene3D, the aspect engine is
destroyed after the QWindow (because of delete later), so the m_obj
pointer we store inside the PlatformSurfaceFilter becomes dangling,
leading to a crash in the destructor.

Use QPointer to ensure m_obj it set null when it is destroyed.

Fixes: QTBUG-111325
Pick-to: 6.5
Change-Id: Icf153700a5708abff4b92b14ce2f9bb12d8653eb
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
commit2c3ebe01cb2875bfe48af20446b8c2b62ff49382
parent57f190ddfe396d61b7ed284aae263dfeedc8f666
authorAurélien Brooke <aurelien@bahiasoft.fr>
committerAurélien Brooke <aurelien@bahiasoft.fr>
commit timeThu, 13 Apr 2023 11:21:43 +0200