Commit fb01a3b7 authored by Jacob Dufault's avatar Jacob Dufault Committed by Commit Bot

cros: Fix crash when adding a user after removing one.

Caused by a DCHECK crash from a pointer pointing to deallocated memory.

Bug: 866535
Change-Id: I96d76aeaeb8c89316cd6ffb237928cd2bfcfb744
Reviewed-on: https://chromium-review.googlesource.com/1165850Reviewed-by: default avatarXiaoyin Hu <xiaoyinh@chromium.org>
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581326}
parent 725ceeda
...@@ -543,6 +543,7 @@ void LockContentsView::OnUsersChanged( ...@@ -543,6 +543,7 @@ void LockContentsView::OnUsersChanged(
// The debug view will potentially call this method many times. Make sure to // The debug view will potentially call this method many times. Make sure to
// invalidate any child references. // invalidate any child references.
main_view_->RemoveAllChildViews(true /*delete_children*/); main_view_->RemoveAllChildViews(true /*delete_children*/);
primary_big_view_ = nullptr;
opt_secondary_big_view_ = nullptr; opt_secondary_big_view_ = nullptr;
users_list_ = nullptr; users_list_ = nullptr;
layout_actions_.clear(); layout_actions_.clear();
......
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