Skip to content

Commit 2e3c9a4

Browse files
Restoring null check removed in recent commit
See ReactiveX@caf3a94 for removal It started causing this unit test to fail: rx.operators.OperationZip$UnitTest > testAggregatorUnsubscribe FAILED java.lang.NullPointerException at OperationZip.java:611 Not sure how I missed it when I reviewed the previous commit … but I did.
1 parent 1d5a716 commit 2e3c9a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rxjava-core/src/main/java/rx/operators/OperationZip.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,10 @@ private void stop() {
259259
/* tell ourselves to stop processing onNext events by setting running=false */
260260
if (running.compareAndSet(true, false)) {
261261
/* propogate to all Observers to unsubscribe if this thread succeeded in setting running=false */
262-
for (ZipObserver<T, ?> rw : observers) {
263-
rw.subscription.unsubscribe();
262+
for (ZipObserver<T, ?> o : observers) {
263+
if (o.subscription != null) {
264+
o.subscription.unsubscribe();
265+
}
264266
}
265267
}
266268
}

0 commit comments

Comments
 (0)