REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizo...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 17:57:49 +0000 (17:57 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 17:57:49 +0000 (17:57 +0000)
<rdar://problem/21525376>

Reviewed by Sam Weinig.

* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
Null check.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/TextIndicator.cpp

index 3ef8804..05e4fef 100644 (file)
@@ -1,3 +1,14 @@
+2015-06-24  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
+        <rdar://problem/21525376>
+
+        Reviewed by Sam Weinig.
+
+        * page/TextIndicator.cpp:
+        (WebCore::TextIndicator::createWithRange):
+        Null check.
+
 2015-06-24  Zalan Bujtas  <zalan@apple.com>
 
         Subpixel rendering: roundToDevicePixel() snaps to wrong value.
index 1052d50..81d315c 100644 (file)
@@ -105,7 +105,8 @@ RefPtr<TextIndicator> TextIndicator::createWithRange(const Range& range, TextInd
 
     frame->selection().setSelection(oldSelection);
 
-    indicator->setWantsMargin(!areRangesEqual(&range, oldSelection.toNormalizedRange().get()));
+    if (indicator)
+        indicator->setWantsMargin(!areRangesEqual(&range, oldSelection.toNormalizedRange().get()));
     
     return indicator.release();
 }