diff options
author | 2017-09-27 18:04:34 -0400 | |
---|---|---|
committer | 2017-09-27 22:23:28 +0000 | |
commit | 6ca9c6f41224050d92cae548e915f5b9175efe8b (patch) | |
tree | e385ee779c1f9dfa407d9d3bad39998ea05e7e7d /src | |
parent | 0b5e7d16c20f4c5b75377f6722fc1bb57e63e9f3 (diff) |
Fix crash in setLastUseTokenBulk
Bug: skia:3550
Change-Id: I00f83f40b30549cbfcb65e6a39afba6355d62299
Reviewed-on: https://skia-review.googlesource.com/52420
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawOpAtlas.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/GrDrawOpAtlas.h b/src/gpu/GrDrawOpAtlas.h index d4a81a0106..2031d2e60b 100644 --- a/src/gpu/GrDrawOpAtlas.h +++ b/src/gpu/GrDrawOpAtlas.h @@ -195,9 +195,11 @@ public: int count = updater.fPlotsToUpdate.count(); for (int i = 0; i < count; i++) { const BulkUseTokenUpdater::PlotData& pd = updater.fPlotsToUpdate[i]; - Plot* plot = fPages[pd.fPageIndex].fPlotArray[pd.fPlotIndex].get(); - this->makeMRU(plot, pd.fPageIndex); - plot->setLastUseToken(token); + if (pd.fPageIndex < fNumPages) { + Plot* plot = fPages[pd.fPageIndex].fPlotArray[pd.fPlotIndex].get(); + this->makeMRU(plot, pd.fPageIndex); + plot->setLastUseToken(token); + } } } |