mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[glass] Check for struct descriptor size 0 (#7192)
This avoids a potential divide by 0.
This commit is contained in:
@@ -745,7 +745,7 @@ void NetworkTablesModel::ValueSource::UpdateFromValue(
|
||||
structName = *withoutArray;
|
||||
}
|
||||
auto desc = model.m_structDb.Find(structName);
|
||||
if (desc && desc->IsValid()) {
|
||||
if (desc && desc->IsValid() && desc->GetSize() != 0) {
|
||||
if (isArray) {
|
||||
// array of struct at top level
|
||||
if (valueChildrenMap) {
|
||||
|
||||
Reference in New Issue
Block a user