Commit f99ef034 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Mac: don't call through a null pointer

-[AppControllerMac lastProfile] can return null; check for that.

Bug: 1143001
Change-Id: I89abfd6171c12d6fceab982fb2d895137a6a0bde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505605
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821878}
parent 4f5e92a4
......@@ -1250,6 +1250,11 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// profile are implemented as forced incognito, we can't open a new guest
// browser either, so we have to show the User Manager as well.
Profile* lastProfile = [self lastProfile];
if (!lastProfile) {
// Without a profile there's nothing that can be done, but still return NO
// to AppKit as there's nothing that it can do either.
return NO;
}
if (lastProfile->IsGuestSession() || IsProfileSignedOut(lastProfile) ||
lastProfile->IsSystemProfile()) {
UserManager::Show(base::FilePath(),
......
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