forked from qt-creator/qt-creator
LanguageClient: Fix possbible crash in inspector
... when clearing. Change-Id: Iadb57c07562fab77a65bcad38cf509dd1af6c0c3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -431,7 +431,8 @@ LspInspectorWidget::LspInspectorWidget(LspInspector *inspector)
|
||||
const auto clearButton = buttonBox->addButton(tr("Clear"), QDialogButtonBox::ResetRole);
|
||||
connect(clearButton, &QPushButton::clicked, this, [this] {
|
||||
m_inspector->clear();
|
||||
currentClientChanged(m_clients->currentItem()->text());
|
||||
if (m_clients->currentItem())
|
||||
currentClientChanged(m_clients->currentItem()->text());
|
||||
});
|
||||
mainLayout->addWidget(buttonBox);
|
||||
setLayout(mainLayout);
|
||||
|
Reference in New Issue
Block a user