Skip to content

Commit 6fa2da4

Browse files
committed
Merge pull request koush#209 from robUx4/endcallback_npe_fix
Crash fix for a case where the EndCallback is not set and used
2 parents d5754db + 68c948e commit 6fa2da4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AndroidAsync/src/com/koushikdutta/async/BufferedDataEmitter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void onDataAvailable() {
3232
if (mDataCallback != null && !mPaused && mBuffers.remaining() > 0)
3333
mDataCallback.onDataAvailable(this, mBuffers);
3434

35-
if (mEnded && mBuffers.remaining() == 0)
35+
if (mEnded && mBuffers.remaining() == 0 && mEndCallback != null)
3636
mEndCallback.onCompleted(mEndException);
3737
}
3838

0 commit comments

Comments
 (0)