If disabled, make sure we don't try calling rade_text_* with a null pointer. (#794)

pull/795/head^2
Mooneer Salem 2025-01-05 18:48:15 -08:00 committed by GitHub
parent b527c83a1c
commit 524d0b8eb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -110,12 +110,12 @@ std::shared_ptr<short> RADEReceiveStep::execute(std::shared_ptr<short> inputSamp
int hasEooOut = 0; int hasEooOut = 0;
float eooOut[rade_n_eoo_bits(dv_)]; float eooOut[rade_n_eoo_bits(dv_)];
nout = rade_rx(dv_, features_out, &hasEooOut, eooOut, input_buf_cplx); nout = rade_rx(dv_, features_out, &hasEooOut, eooOut, input_buf_cplx);
if (hasEooOut) if (hasEooOut && textPtr_ != nullptr)
{ {
// Handle RX of bits from EOO. // Handle RX of bits from EOO.
rade_text_rx(textPtr_, eooOut, rade_n_eoo_bits(dv_) / 2); rade_text_rx(textPtr_, eooOut, rade_n_eoo_bits(dv_) / 2);
} }
else else if (!hasEooOut)
{ {
if (featuresFile_) if (featuresFile_)
{ {