Commit b79ce46d authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Fix remaining crashes where main frame is likely null

- Add null check for MainFrame() similar to elsewhere in
  VisualViewport::UpdatePaintPropertyNodesIfNeeded()

Bug: 1134597
Change-Id: Iaaf6d91788051c650f8ed270787cf47782649053
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468737
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816814}
parent 2dbccf3e
...@@ -325,7 +325,7 @@ PaintPropertyChangeType VisualViewport::UpdatePaintPropertyNodesIfNeeded( ...@@ -325,7 +325,7 @@ PaintPropertyChangeType VisualViewport::UpdatePaintPropertyNodesIfNeeded(
parent_property_tree_state_ = parent_property_tree_state_ =
PropertyTreeStateOrAlias(*transform_parent, *clip_parent, *effect_parent); PropertyTreeStateOrAlias(*transform_parent, *clip_parent, *effect_parent);
if (change == PaintPropertyChangeType::kNodeAddedOrRemoved) if (change == PaintPropertyChangeType::kNodeAddedOrRemoved && MainFrame())
MainFrame()->View()->SetVisualViewportNeedsRepaint(); MainFrame()->View()->SetVisualViewportNeedsRepaint();
return change; return change;
......
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