aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-22 15:27:20 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-22 21:14:35 +0000
commit2e6feed858c2b14b9083cf7d2b040a177dcb62ea (patch)
tree64659c74460d88316a038dd1d0daf87f06443702 /src
parentbaafcdcd543571238654df87f060a9f5be0eb570 (diff)
Fix crash in ~GrContext
BUG=804352, 804111 Change-Id: Ia8475a4a8a6de77438cde7df53931dc70c405b16 Reviewed-on: https://skia-review.googlesource.com/98341 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index eedb3e475f..f6c66db223 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -314,7 +314,9 @@ GrContext::~GrContext() {
this->flush();
}
- fDrawingManager->cleanup();
+ if (fDrawingManager) {
+ fDrawingManager->cleanup();
+ }
for (int i = 0; i < fCleanUpData.count(); ++i) {
(*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo);