summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-08 01:58:38 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-08 01:58:38 +0000
commitbf6cf63f94a08f20b9405dfc8fc5cc74b4233804 (patch)
tree20edf2b8ae9017e5dad667591b2309c38d5784b8 /ui
parentd4ccda53c97d25057d8e5c8aebca4e6151037e8e (diff)
downloadchromium_src-bf6cf63f94a08f20b9405dfc8fc5cc74b4233804.zip
chromium_src-bf6cf63f94a08f20b9405dfc8fc5cc74b4233804.tar.gz
chromium_src-bf6cf63f94a08f20b9405dfc8fc5cc74b4233804.tar.bz2
Skip runs with no glyphs when drawing text in RenderTextWin.
Speculative fix for http://crash/reportdetail?reportid=bd4ea3a931d355ba BUG=105550 TEST=Monitor crash server. Review URL: http://codereview.chromium.org/9347034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/render_text_win.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index 87fa314..b29c90c 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -455,6 +455,9 @@ void RenderTextWin::DrawVisualText(Canvas* canvas) {
// Get the run specified by the visual-to-logical map.
internal::TextRun* run = runs_[visual_to_logical_[i]];
+ if (run->glyph_count == 0)
+ continue;
+
// Based on WebCore::skiaDrawText.
pos.resize(run->glyph_count);
SkScalar glyph_x = x;