Commit f7d321f8 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix crash in //c/b/chromeos/arc/tracing/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: I362e6fce1d3c456f313f9532a4d160d3bd660dd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2555040
Commit-Queue: Yury Khmel <khmel@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831066}
parent 776a517d
......@@ -165,8 +165,10 @@ bool ArcAppPerformanceTracing::StartCustomTracing() {
void ArcAppPerformanceTracing::StopCustomTracing(
ResultCallback result_callback) {
if (!session_ || !session_->AsCustomSession())
if (!session_ || !session_->AsCustomSession()) {
std::move(result_callback).Run(false /* success */, 0, 0, 0);
return;
}
session_->AsCustomSession()->StopAndAnalyze(std::move(result_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