added nullptr check
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details

This commit is contained in:
Robin Müller 2022-03-24 20:57:42 +01:00
parent 8a44c498c5
commit 879223f38f
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ void SimpleRingBuffer::confirmBytesWritten(size_t amount) {
}
ReturnValue_t SimpleRingBuffer::writeData(const uint8_t* data, size_t amount) {
if(data == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
if(amount > getMaxSize()) {
#if FSFW_VERBOSE_LEVEL >= 1
#if FSFW_CPP_OSTREAM_ENABLED == 1