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>
This commit is contained in:
Jim Van Verth 2017-09-27 18:04:34 -04:00 committed by Skia Commit-Bot
parent 0b5e7d16c2
commit 6ca9c6f412

View File

@ -195,9 +195,11 @@ public:
int count = updater.fPlotsToUpdate.count(); int count = updater.fPlotsToUpdate.count();
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
const BulkUseTokenUpdater::PlotData& pd = updater.fPlotsToUpdate[i]; const BulkUseTokenUpdater::PlotData& pd = updater.fPlotsToUpdate[i];
Plot* plot = fPages[pd.fPageIndex].fPlotArray[pd.fPlotIndex].get(); if (pd.fPageIndex < fNumPages) {
this->makeMRU(plot, pd.fPageIndex); Plot* plot = fPages[pd.fPageIndex].fPlotArray[pd.fPlotIndex].get();
plot->setLastUseToken(token); this->makeMRU(plot, pd.fPageIndex);
plot->setLastUseToken(token);
}
} }
} }