Merge "Add null check before using mCallback"

This commit is contained in:
TreeHugger Robot
2020-09-09 00:40:09 +00:00
committed by Android (Google) Code Review

View File

@@ -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 */);
}
}
}