stream->Add(device->StreamCreate(streamCfg, index));
StreamComposite::Add stores the raw pointer without validation. StreamCreate returns null when the board's stream port is unavailable (LimeSDR_XTRX) or when the internal TRXLooper::Setup rejects the configuration, and StreamComposite::Setup then dereferences it while summing the per-device channel counts.
StreamComposite::Addstores the raw pointer without validation.StreamCreatereturns null when the board's stream port is unavailable (LimeSDR_XTRX) or when the internalTRXLooper::Setuprejects the configuration, andStreamComposite::Setupthen dereferences it while summing the per-device channel counts.