Commit c4225c3f authored by Frank Liberato's avatar Frank Liberato Committed by Chromium LUCI CQ

Added missing weak ptr null check.

WeakLearningSessionImpl::PredictDistribution accessed the session,
without first checking if its weak ptr was valid.  This CL adds that
wp check.

Bug: 1159663
Change-Id: I2c26fd8cb22cd2c78d39267e58e8b79217cee1c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2602258Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839165}
parent f730afe0
......@@ -92,6 +92,8 @@ class WeakLearningTaskController : public LearningTaskController {
void PredictDistribution(const FeatureVector& features,
PredictionCB callback) override {
if (!weak_session_)
return;
controller_->AsyncCall(&LearningTaskController::PredictDistribution)
.WithArgs(features, std::move(callback));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment