Plugins: Fix nullptr access

Some plugins access their private "d" member in their destructor.
If Plugin initialization failed, these might not have been created.

This would lead to a crash.

Change-Id: Ifd916daf90ebac9a8933dd5489ec1ac0a38254a0
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-09-01 09:18:16 +02:00
parent dc3eae230f
commit b17cf5f117
3 changed files with 6 additions and 0 deletions

View File

@@ -100,6 +100,8 @@ public:
QmlProjectPlugin::~QmlProjectPlugin()
{
QTC_ASSERT(d, return);
if (d->lastMessageBox)
d->lastMessageBox->deleteLater();
if (d->landingPage)