some nullptr checks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-09-25 18:07:28 +02:00
parent eb538a789a
commit 50809e35a9
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,10 @@ will consitute of a breaking change warranting a new major release:
parameters better configurable. This should not affect the behaviour of the OBSW, but might parameters better configurable. This should not affect the behaviour of the OBSW, but might
make it more reliable and fix some corner cases. make it more reliable and fix some corner cases.
## Fixed
- Missing `nullptr` checks for PLOC Supervisor handler, which could lead to crashes.
# [v6.6.0] 2023-09-18 # [v6.6.0] 2023-09-18
## Changed ## Changed

View File

@ -1533,7 +1533,13 @@ void PlocSupervisorHandler::disableAllReplies() {
/* Disable ack reply */ /* Disable ack reply */
iter = deviceReplyMap.find(ACK_REPORT); iter = deviceReplyMap.find(ACK_REPORT);
if (iter == deviceReplyMap.end()) {
return;
}
DeviceReplyInfo* info = &(iter->second); DeviceReplyInfo* info = &(iter->second);
if (info == nullptr) {
return;
}
info->delayCycles = 0; info->delayCycles = 0;
info->command = deviceCommandMap.end(); info->command = deviceCommandMap.end();