added nullptr check

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

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