From b5702f7a21a986a75da0784f21b36d096649ce50 Mon Sep 17 00:00:00 2001 From: Daosheng Mu Date: Thu, 7 Mar 2019 16:07:52 -0800 Subject: [PATCH] Resolved the second controller disappear problem. (#977) --- app/src/main/cpp/ControllerContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/ControllerContainer.cpp b/app/src/main/cpp/ControllerContainer.cpp index c8d060b75..895ab51f6 100644 --- a/app/src/main/cpp/ControllerContainer.cpp +++ b/app/src/main/cpp/ControllerContainer.cpp @@ -44,7 +44,7 @@ struct ControllerContainer::State { } void SetUpModelsGroup(const int32_t aModelIndex) { - if (models.size() >= aModelIndex) { + if (aModelIndex >= models.size()) { models.resize((size_t)(aModelIndex + 1)); } if (!models[aModelIndex]) {