qt: fix crash at exit on Windows 8/10/11 and crash at startup on Windows 7 regressions
When ::destroyMainInterface()
already gets called before, ::unloadGUI()
gets
called again as well and with the recent introduction of m_quickView->setSource(QUrl());
there without first checking for null pointer it causes null pointer dereference as
::destroyMainInterface()
already destroys the ::m_quickView
instance.
At the same time, calling ::destroyMainInterface()
during destruction causes
the same null pointer dereference, since if initialization fails there is no
::m_quickView
instance. This is a case with Windows 7 where direct composition
is not available, which causes crash at start.
Regression since !6503 (merged).
Request review @chub.