aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-07-12 11:49:25 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-12 17:35:23 +0000
commitd46f0091afdc2563ec50319c4f93d110e0868fb9 (patch)
tree0f772b56bd0f72d901b140d1d4bc27771755326c /src
parent4cb6520bd0f0b65b29b02d8fa95afea689ae592b (diff)
Add check before freeing op in GrTextureOpList
This now matches the behavior of the GrRenderTargetOpList and is probably behind all the TSAN complaints. Change-Id: I9a1cc65a893c20e9927d21814227673167f2f675 Reviewed-on: https://skia-review.googlesource.com/141047 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrTextureOpList.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp
index 6a601aa83c..6af9588fdf 100644
--- a/src/gpu/GrTextureOpList.cpp
+++ b/src/gpu/GrTextureOpList.cpp
@@ -34,7 +34,9 @@ void GrTextureOpList::deleteOp(int index) {
void GrTextureOpList::deleteOps() {
for (int i = 0; i < fRecordedOps.count(); ++i) {
- fOpMemoryPool->release(std::move(fRecordedOps[i]));
+ if (fRecordedOps[i]) {
+ fOpMemoryPool->release(std::move(fRecordedOps[i]));
+ }
}
fRecordedOps.reset();
fOpMemoryPool = nullptr;