<rdar://problem/
10263562> Crash in WebCore::Range::startPosition() when dismissing the Press and Hold panel by clicking in the menu bar
https://bugs.webkit.org/show_bug.cgi?id=81454
Reviewed by Ada Chan.
When the Press and Hold panel is dismissed by clicking in the menu bar,
-insertText:replacementRange: is called with an NSRange whose location is NSNotFound - 1
(see <rdar://problem/
11069374>). Trying to convert this bogus range to a WebCore Range
returns 0, which leads to the crash.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertText): Added a null check, to protect the code from bogus ranges.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111125
268f45cc-cd09-0410-ab3c-
d52691b4dbfc