diff options
author | Christian Stenger <christian.stenger@qt.io> | 2018-04-24 14:07:17 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2018-04-24 12:10:17 +0000 |
commit | ef9c5e47bb98a79a71beb45c9b0ffeda2e86f38c (patch) | |
tree | 98764afa4812fd14f6b0d9c43da6ea5fd0414067 /src/plugins/coreplugin/outputpanemanager.cpp | |
parent | fd42415c0540b9a99c0c90775918a0e6f03b5139 (diff) | |
download | qt-creator-ef9c5e47bb98a79a71beb45c9b0ffeda2e86f38c.tar.gz |
Core: Turn soft assert into if clause
It is perfectly legal to have a plugin disabled that was
enabled before. If the respective plugin has an output
pane the respective setting had been stored and the pane
can not be restored when the plugin is not loaded.
Change-Id: I25910c44dba83faf3c52ae836f2e83d0e69236d5
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/outputpanemanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/outputpanemanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index f14c1097b5..7262decedf 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -432,7 +432,8 @@ void OutputPaneManager::readSettings() settings->setArrayIndex(i); Id id = Id::fromSetting(settings->value(QLatin1String(outputPaneIdKeyC))); const int idx = Utils::indexOf(g_outputPanes, Utils::equal(&OutputPaneData::id, id)); - QTC_ASSERT(idx >= 0, continue); + if (idx < 0) // happens for e.g. disabled plugins (with outputpanes) that were loaded before + continue; const bool visible = settings->value(QLatin1String(outputPaneVisibleKeyC)).toBool(); g_outputPanes[idx].buttonVisible = visible; g_outputPanes[idx].button->setVisible(visible); |