forked from qt-creator/qt-creator
CdbExtension: Make sure watches group is initialized.
This fixes a crash that occurs when a debugger was started without an active watch and a watch were added afterwards. Change-Id: I0219a750bae7b433240b22f99b2e8fd8655ca331 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -513,14 +513,16 @@ static std::string commandLocals(ExtensionCommandContext &commandExtCtx,PCSTR ar
|
|||||||
if (watchSynchronization) {
|
if (watchSynchronization) {
|
||||||
watchesSymbolGroup = 0;
|
watchesSymbolGroup = 0;
|
||||||
extCtx.discardWatchesSymbolGroup();
|
extCtx.discardWatchesSymbolGroup();
|
||||||
if (!watcherInameExpressionMap.empty()) {
|
}
|
||||||
// Force group into existence
|
|
||||||
watchesSymbolGroup = extCtx.watchesSymbolGroup(commandExtCtx.symbols(), errorMessage);
|
if (watchesSymbolGroup == 0
|
||||||
if (!watchesSymbolGroup || !watchesSymbolGroup->synchronize(commandExtCtx.symbols(),
|
&& (!watcherInameExpressionMap.empty() || WatchesSymbolGroup::isWatchIname(iname))) {
|
||||||
watcherInameExpressionMap,
|
// Force group into existence
|
||||||
errorMessage)) {
|
watchesSymbolGroup = extCtx.watchesSymbolGroup(commandExtCtx.symbols(), errorMessage);
|
||||||
return std::string();
|
if (!watchesSymbolGroup || !watchesSymbolGroup->synchronize(commandExtCtx.symbols(),
|
||||||
}
|
watcherInameExpressionMap,
|
||||||
|
errorMessage)) {
|
||||||
|
return std::string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user