From e68873ec924a4d530291a811976379232fde034e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 20 Apr 2022 01:25:35 +0200 Subject: [PATCH] mgm lis3 release warning fix --- hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp b/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp index 644b488d..242c5147 100644 --- a/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp +++ b/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.cpp @@ -375,6 +375,9 @@ float MgmLIS3MDLHandler::getSensitivityFactor(MGMLIS3MDL::Sensitivies sens) { ReturnValue_t MgmLIS3MDLHandler::enableTemperatureSensor(const uint8_t *commandData, size_t commandDataLen) { + if(commandData == nullptr) { + return INVALID_COMMAND_PARAMETER; + } triggerEvent(CHANGE_OF_SETUP_PARAMETER); uint32_t size = 2; commandBuffer[0] = writeCommand(MGMLIS3MDL::CTRL_REG1);