Commit da5442f6 authored by Bettina's avatar Bettina Committed by Commit Bot

Fix segmentation fault requesting null change_password_button

The if statement for change_password_button was
reversed and used the object when it was null.

Bug: 1068396
Change-Id: I13fce75f5aaeee0749a59de08bd439362d93b4ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2145677
Auto-Submit: Bettina Dea <bdea@chromium.org>
Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758319}
parent d440e478
...@@ -338,8 +338,8 @@ void BubbleHeaderView::AddPasswordReuseButtons(bool is_saved_password) { ...@@ -338,8 +338,8 @@ void BubbleHeaderView::AddPasswordReuseButtons(bool is_saved_password) {
int kSpacingBetweenButtons = 8; int kSpacingBetweenButtons = 8;
int change_password_button_size = int change_password_button_size =
change_password_button change_password_button
? 0 ? change_password_button->CalculatePreferredSize().width()
: change_password_button->CalculatePreferredSize().width(); : 0;
// If these two buttons cannot fit into a single line, stack them vertically. // If these two buttons cannot fit into a single line, stack them vertically.
bool can_fit_in_one_line = bool can_fit_in_one_line =
......
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