Crash getting default animation controller for some text
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Dec 2014 00:41:40 +0000 (00:41 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Dec 2014 00:41:40 +0000 (00:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139712
-and corresponding-
rdar://problem/19271707

Reviewed by Tim Horton.

Must null-check the range.
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForText]):

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

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebImmediateActionController.mm

index e9a2c49..616e51e 100644 (file)
@@ -1,3 +1,16 @@
+2014-12-16  Beth Dakin  <bdakin@apple.com>
+
+        Crash getting default animation controller for some text
+        https://bugs.webkit.org/show_bug.cgi?id=139712
+        -and corresponding-
+        rdar://problem/19271707
+
+        Reviewed by Tim Horton.
+
+        Must null-check the range.
+        * WebView/WebImmediateActionController.mm:
+        (-[WebImmediateActionController _animationControllerForText]):
+
 2014-12-16  Timothy Horton  <timothy_horton@apple.com>
 
         Immediate action popovers can get stuck open
index 8cef213..4250261 100644 (file)
@@ -346,6 +346,8 @@ static DictionaryPopupInfo dictionaryPopupInfoForRange(Frame* frame, Range& rang
 
     NSDictionary *options = nil;
     RefPtr<Range> dictionaryRange = rangeForDictionaryLookupAtHitTestResult(_hitTestResult, &options);
+    if (!dictionaryRange)
+        return nil;
 
     DictionaryPopupInfo dictionaryPopupInfo = dictionaryPopupInfoForRange(frame, *dictionaryRange, options, TextIndicatorPresentationTransition::Bounce);
     if (!dictionaryPopupInfo.attributedString)