forked from qt-creator/qt-creator
Android: Ensure the target is not nullptr
It might happen that runnerRecipe() is executed after the avdRecipe, so slightly delayed. In meantime the shutdown could have started and a queued call to stop() was scheduled by the RunControl. In this case it may happen that before the runnerRecipe() starts before the stop() is executed. Guard the target inside runnerRecipe() and stop with error when it's nullptr. Change-Id: I3da15a14e0d555e851bdb2bbc053973c31cba308 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -875,7 +875,10 @@ ExecutableItem runnerRecipe(const Storage<RunnerInterface> &glueStorage)
|
|||||||
const Storage<RunnerStorage> storage;
|
const Storage<RunnerStorage> storage;
|
||||||
|
|
||||||
const auto onSetup = [glueStorage, storage] {
|
const auto onSetup = [glueStorage, storage] {
|
||||||
|
if (glueStorage->runControl()->target() == nullptr)
|
||||||
|
return SetupResult::StopWithError;
|
||||||
setupStorage(storage.activeStorage(), glueStorage.activeStorage());
|
setupStorage(storage.activeStorage(), glueStorage.activeStorage());
|
||||||
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
return Group {
|
return Group {
|
||||||
|
Reference in New Issue
Block a user