aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 17:59:32 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 17:59:32 +0000
commit733c062c09bfe3ec4a32658510136fc5850a6e2c (patch)
treefdf6fd88efda832fc1a3071121437c6735428425 /src/gpu
parentdae739e94901043d44cfbc295fb549d75f5bd735 (diff)
Exit ~GrContext early if GrContext::init() failed.
Review URL: https://codereview.chromium.org/14049028 git-svn-id: http://skia.googlecode.com/svn/trunk@8841 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrContext.cpp4
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