Chromium Code Reviews| Index: ui/gfx/render_text_linux.cc |
| =================================================================== |
| --- ui/gfx/render_text_linux.cc (revision 113627) |
| +++ ui/gfx/render_text_linux.cc (working copy) |
| @@ -284,6 +284,8 @@ |
| } |
| size_t RenderTextLinux::IndexOfAdjacentGrapheme(size_t index, bool next) { |
| + if (index > text().length()) |
| + return text().length(); |
| EnsureLayout(); |
| return Utf16IndexOfAdjacentGrapheme(Utf16IndexToUtf8Index(index), next); |
| } |