Skip to content

Commit

Permalink
prevent onError to be emitted when emitter is disposed (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauin authored Nov 23, 2016
1 parent 5c0f129 commit d34e73f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ private AuthenticationCallback createAuthenticationCallback(ObservableEmitter<T>
@Override
public void onAuthenticationError(int errMsgId, CharSequence errString) {
super.onAuthenticationError(errMsgId, errString);
emitter.onError(new FingerprintAuthenticationException(errString));
if (!emitter.isDisposed()) {
emitter.onError(new FingerprintAuthenticationException(errString));
}
}

@Override
Expand Down

0 comments on commit d34e73f

Please sign in to comment.