Bug 1449157 - Guard against mContent being null in nsFrame::HandlePress. r=dholbert, a=jcristau
authorJonathan Kew <jkew@mozilla.com>
Wed, 28 Mar 2018 14:42:20 +0100
changeset 460517 14ea71e3100ee7c5e3f1f8abc46ce14211e6457f
parent 460516 4c10eb56d4607cd77b4846c73f00d992627ac0f0
child 460518 3feed561ed8435756be8aa35b9cb7f21a0c5a08a
push id8963
push userryanvm@gmail.com
push dateTue, 03 Apr 2018 15:25:18 +0000
treeherdermozilla-beta@14ea71e3100e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, jcristau
bugs1449157
milestone60.0
Bug 1449157 - Guard against mContent being null in nsFrame::HandlePress. r=dholbert, a=jcristau
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4270,17 +4270,17 @@ nsFrame::HandlePress(nsPresContext* aPre
 
   fc->SetDelayedCaretData(0);
 
   // Check if any part of this frame is selected, and if the
   // user clicked inside the selected region. If so, we delay
   // starting a new selection since the user may be trying to
   // drag the selected region to some other app.
 
-  if (GetContent()->IsSelectionDescendant())
+  if (GetContent() && GetContent()->IsSelectionDescendant())
   {
     bool inSelection = false;
     UniquePtr<SelectionDetails> details
       = frameselection->LookUpSelection(offsets.content, 0,
                                         offsets.EndOffset(), false);
 
     //
     // If there are any details, check to see if the user clicked