It's possible that users of our library to call onComplete() or onNext() of a Subscriber which has an already cancelled Subscription.
I have observed that the app is crashing for such instances and pointing exactly this line.
I have noticed that cancellation etc is causing consumingSubscriber_ object to be assigned to nullptr. So, we need to check if this object is nullptr before using it.
I wonder if I should keep a local reference to the subscriber before calling onNext on it, but I did not want to be over protective as this fixed the failure already.
It's possible that users of our library to call onComplete() or onNext() of a Subscriber which has an already cancelled Subscription.
I have observed that the app is crashing for such instances and pointing exactly this line. I have noticed that cancellation etc is causing consumingSubscriber_ object to be assigned to nullptr. So, we need to check if this object is nullptr before using it.
I wonder if I should keep a local reference to the subscriber before calling onNext on it, but I did not want to be over protective as this fixed the failure already.