Merge pull request 'nullptr check added' (#324) from KSat/fsfw:mueller/datapool-update into development

Reviewed-on: fsfw/fsfw#324
This commit is contained in:
Steffen Gaisser 2020-12-22 15:12:03 +01:00
commit 85d6e02291

View File

@ -59,6 +59,11 @@ uint16_t PoolDataSetBase::getFillCount() const {
ReturnValue_t PoolDataSetBase::readVariable(uint16_t count) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
if(registeredVariables[count] == nullptr) {
// configuration error.
return HasReturnvaluesIF::RETURN_FAILED;
}
// These checks are often performed by the respective
// variable implementation too, but I guess a double check does not hurt.
if (registeredVariables[count]->getReadWriteMode() !=