Skip to content

Commit

Permalink
[fuchsia] Ensure we do not initialize nan RoundedRectangles
Browse files Browse the repository at this point in the history
Also initializes physical shape layer vars to empty.
  • Loading branch information
Kaushik Iska committed Nov 22, 2019
1 parent 7a77e36 commit b002bc9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flow/scene_update_context.cc
Expand Up @@ -71,6 +71,13 @@ void SceneUpdateContext::CreateFrame(scenic::EntityNode entity_node,
if (rrect.isEmpty())
return;

// isEmpty should account for this, but we are adding these experimental
// checks to validate if this is the root cause for b/144933519.
if (std::isnan(rrect.width()) || std::isnan(rrect.height())) {
FML_LOG(ERROR) << "Invalid RoundedRectangle";
return;
}

// Add a part which represents the frame's geometry for clipping purposes
// and possibly for its texture.
// TODO(SCN-137): Need to be able to express the radii as vectors.
Expand Down

0 comments on commit b002bc9

Please sign in to comment.