diff options
-rw-r--r-- | src/gpu/GrContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index ded4bc1d4c..5d0465e65d 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -140,6 +140,10 @@ GrContext::~GrContext() { (*fCleanUpData[i].fFunc)(this, fCleanUpData[i].fInfo); } + if (NULL == fGpu) { + return; + } + this->flush(); // Since the gpu can hold scratch textures, give it a chance to let go |