diff --git a/src/Mass/Mass.cpp b/src/Mass/Mass.cpp index 63f8c53..18b4b4e 100644 --- a/src/Mass/Mass.cpp +++ b/src/Mass/Mass.cpp @@ -147,6 +147,11 @@ void Mass::refreshValues() { return; } + if(frame_styles->items.size() != 4) { + _state = State::Invalid; + return; + } + for(UnsignedInt i = 0; i < 4; i++) { _frame.styles[i] = frame_styles->at(i)->value; } @@ -169,6 +174,11 @@ void Mass::refreshValues() { return; } + if(frame_styles->items.size() != 16) { + _state = State::Invalid; + return; + } + for(UnsignedInt i = 0; i < frame_styles->items.size(); i++) { auto style_prop = frame_styles->at(i); @@ -205,6 +215,11 @@ void Mass::refreshValues() { return; } + if(armour_styles->items.size() != 16) { + _state = State::Invalid; + return; + } + for(UnsignedInt i = 0; i < armour_styles->items.size(); i++) { auto style_prop = armour_styles->at(i); @@ -241,6 +256,11 @@ void Mass::refreshValues() { return; } + if(global_styles->items.size() != 16) { + _state = State::Invalid; + return; + } + for(UnsignedInt i = 0; i < global_styles->items.size(); i++) { auto style_prop = global_styles->at(i);