Commit c3506078 authored by Sam Kravitz's avatar Sam Kravitz
Browse files

Bug 1832402 - Use SafeElementAt(0) for the return statement of...

Bug 1832402 - Use SafeElementAt(0) for the return statement of nsLayoutUtils::GetFrameForPoint. r=dshin

Differential Revision: https://phabricator.services.mozilla.com/D177832
parent 814f8e4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2680,7 +2680,7 @@ nsIFrame* nsLayoutUtils::GetFrameForPoint(
  rv = GetFramesForArea(aRelativeTo, nsRect(aPt, nsSize(1, 1)), outFrames,
  rv = GetFramesForArea(aRelativeTo, nsRect(aPt, nsSize(1, 1)), outFrames,
                        aOptions);
                        aOptions);
  NS_ENSURE_SUCCESS(rv, nullptr);
  NS_ENSURE_SUCCESS(rv, nullptr);
  return outFrames.Length() ? outFrames.ElementAt(0) : nullptr;
  return outFrames.SafeElementAt(0);
}
}


nsresult nsLayoutUtils::GetFramesForArea(RelativeTo aRelativeTo,
nsresult nsLayoutUtils::GetFramesForArea(RelativeTo aRelativeTo,