From cffb5e767ff2affe4c0ca960d3623d008e5e55fc Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Sun, 10 Dec 2017 06:10:26 -0500 Subject: [PATCH] [Companion] Ensure proper number of model slots after radio data conversion. --- companion/src/radiodata.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/companion/src/radiodata.cpp b/companion/src/radiodata.cpp index 6ef694d5f..d96ceaf53 100644 --- a/companion/src/radiodata.cpp +++ b/companion/src/radiodata.cpp @@ -307,4 +307,9 @@ void RadioData::convert(Board::Type before, Board::Type after) if (IS_HORUS(after)) { fixModelFilenames(); } + + // ensure proper number of model slots + if (getCurrentFirmware()->getCapability(Models) && getCurrentFirmware()->getCapability(Models) != (int)models.size()) { + models.resize(getCurrentFirmware()->getCapability(Models)); + } }