Add null check before using mCallback
There's some strange cases where onErrorInternal is being invoked but mCallback is null. However, currently we only have a stack trace. If this really is a problem, a bugreport will be needed. We can only fix the NPE for now. Fixes: 166187582 Test: Builds Change-Id: I8ea932aadb15757383f273b0f6232b379c6b9ae1
This commit is contained in:
@@ -98,7 +98,11 @@ public abstract class AcquisitionClient<T> extends ClientMonitor<T> implements I
|
||||
}
|
||||
|
||||
if (finish) {
|
||||
mCallback.onClientFinished(this, false /* success */);
|
||||
if (mCallback == null) {
|
||||
Slog.e(TAG, "Callback is null, perhaps the client hasn't been started yet?");
|
||||
} else {
|
||||
mCallback.onClientFinished(this, false /* success */);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user