Skip to content

Commit d46cb33

Browse files
authored
cleanup: Simplify branching, CHECK around nullptr (#9165)
This is a good style fix that was suggested by gemini in #9147. Issue: 484370083
1 parent 1b64b5a commit d46cb33

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cobalt/browser/cobalt_browser_main_parts.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ int CobaltBrowserMainParts::PreMainMessageLoopRun() {
5151
StartMetricsRecording();
5252

5353
#if !BUILDFLAG(IS_ANDROIDTV)
54-
if (auto* client = CobaltContentBrowserClient::Get()) {
55-
client->SetUserAgentCrashAnnotation();
56-
} else {
57-
CHECK(false) << "CobaltContentBrowserClient::Get() returned NULL in "
58-
<< "PreMainMessageLoopRun!";
59-
}
54+
auto* client = CobaltContentBrowserClient::Get();
55+
CHECK(client) << "CobaltContentBrowserClient::Get() returned NULL in "
56+
<< "PreMainMessageLoopRun!";
57+
client->SetUserAgentCrashAnnotation();
6058

6159
#endif // !BUILDFLAG(IS_ANDROIDTV)
6260

0 commit comments

Comments
 (0)