additional nullptr check

This commit is contained in:
Robin Müller 2021-08-03 15:29:22 +02:00
parent 0ff81294e7
commit 296c587e3d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 13 additions and 1 deletions

View File

@ -55,7 +55,19 @@ void ActionHelper::setQueueToUse(MessageQueueIF* queue) {
void ActionHelper::prepareExecution(MessageQueueId_t commandedBy,
ActionId_t actionId, store_address_t dataAddress) {
const uint8_t* dataPtr = NULL;
if(ipcStore == nullptr) {
#if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "ActionHelper::prepareExecution: IPC Store not set. Call initialize first"
<< std::endl;
#else
sif::printWarning("ActionHelper::prepareExecution: "
"IPC Store not set. Call initialize first\n");
#endif
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
return;
}
const uint8_t* dataPtr = nullptr;
size_t size = 0;
ReturnValue_t result = ipcStore->getData(dataAddress, &dataPtr, &size);
if (result != HasReturnvaluesIF::RETURN_OK) {