forked from qt-creator/qt-creator
InfoBar: Ensure we don't access nullptr
Change-Id: I4bd7019ea424c04cc1f1e130d76033175ac3a5bf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -374,8 +374,10 @@ void InfoBarDisplay::update()
|
|||||||
if (infoWidgetCloseButton)
|
if (infoWidgetCloseButton)
|
||||||
hbox->addWidget(infoWidgetCloseButton);
|
hbox->addWidget(infoWidgetCloseButton);
|
||||||
} else {
|
} else {
|
||||||
|
if (infoWidgetCloseButton) {
|
||||||
infoWidgetCloseButton->setText(info.m_cancelButtonText);
|
infoWidgetCloseButton->setText(info.m_cancelButtonText);
|
||||||
hbox->addWidget(infoWidgetCloseButton);
|
hbox->addWidget(infoWidgetCloseButton);
|
||||||
|
}
|
||||||
if (infoWidgetSuppressButton)
|
if (infoWidgetSuppressButton)
|
||||||
hbox->addWidget(infoWidgetSuppressButton);
|
hbox->addWidget(infoWidgetSuppressButton);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user