Commit ad3041e9 authored by Piotr Bialecki's avatar Piotr Bialecki Committed by Commit Bot

Add null check in ArCoreJavaUtils::OnDrawingSurfaceDestroyed

`surface_destroyed_callback_` can potentially be null when
`ArCoreJavaUtils::OnDrawingSurfaceDestroyed` gets called.

Bug: 966984
Change-Id: I878ede8a419f95cd6bc083863f369f4054ce039b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648891
Commit-Queue: Piotr Bialecki <bialpio@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667360}
parent 348e043d
......@@ -153,7 +153,9 @@ void ArCoreJavaUtils::OnDrawingSurfaceDestroyed(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj) {
DVLOG(1) << __func__ << ":::";
std::move(surface_destroyed_callback_).Run();
if (surface_destroyed_callback_) {
std::move(surface_destroyed_callback_).Run();
}
}
void ArCoreJavaUtils::OnRequestInstallArModuleResult(
......
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