Commit 3422cf2a authored by Makoto Kato's avatar Makoto Kato
Browse files

Bug 1393171 - More safety check for focus node. r=smaug

MozReview-Commit-ID: 9Byl7RXQivN
parent 570f15da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1678,7 +1678,7 @@ Selection::GetPrimaryFrameForFocusNode(nsIFrame** aReturnFrame,

  *aReturnFrame = nullptr;
  nsINode* focusNode = GetFocusNode();
  if (!focusNode->IsContent() || !mFrameSelection) {
  if (!focusNode || !focusNode->IsContent() || !mFrameSelection) {
    return NS_ERROR_FAILURE;
  }