Fix for GrAtlasTextContext crash
BUG=510931
Review URL: https://codereview.chromium.org/1256763005
diff --git a/src/gpu/GrAtlasTextBlob.h b/src/gpu/GrAtlasTextBlob.h
index 1f37c67..502177d 100644
--- a/src/gpu/GrAtlasTextBlob.h
+++ b/src/gpu/GrAtlasTextBlob.h
@@ -99,8 +99,9 @@
SubRunInfo& push_back() {
// Forward glyph / vertex information to seed the new sub run
- SubRunInfo& prevSubRun = fSubRunInfo.back();
SubRunInfo& newSubRun = fSubRunInfo.push_back();
+ SubRunInfo& prevSubRun = fSubRunInfo.fromBack(1);
+
newSubRun.fGlyphStartIndex = prevSubRun.fGlyphEndIndex;
newSubRun.fGlyphEndIndex = prevSubRun.fGlyphEndIndex;