Commit 18826fed authored by Anatoliy Potapchuk's avatar Anatoliy Potapchuk Committed by Chromium LUCI CQ

[Kiosk] Add nullptr check in ArcKioskAppService for the OnAppPrepared() call

There are cases when |delegate_| is set to nullptr, but we are still on the codepath where it is executed.
For example, restart of the application during the session. In such cases, we should not call already
non-existing delegate.

Bug: 1168248
Change-Id: I44bec441d16115f95e9e92452c3beede37fb11a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2640406Reviewed-by: default avatarAnqing Zhao <anqing@chromium.org>
Commit-Queue: Anatoliy Potapchuk <apotapchuk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845584}
parent 39abf0e8
...@@ -227,6 +227,7 @@ void ArcKioskAppService::PreconditionsChanged() { ...@@ -227,6 +227,7 @@ void ArcKioskAppService::PreconditionsChanged() {
VLOG(2) << "Starting kiosk app"; VLOG(2) << "Starting kiosk app";
app_launcher_ = std::make_unique<ArcKioskAppLauncher>( app_launcher_ = std::make_unique<ArcKioskAppLauncher>(
profile_, ArcAppListPrefs::Get(profile_), app_id_, this); profile_, ArcAppListPrefs::Get(profile_), app_id_, this);
if (delegate_)
delegate_->OnAppPrepared(); delegate_->OnAppPrepared();
} }
} else if (task_id_ != -1) { } else if (task_id_ != -1) {
......
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