Removed access of freed memory in GrContext dtor

http://codereview.appspot.com/6488111/



git-svn-id: http://skia.googlecode.com/svn/trunk@5479 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2012-09-11 12:50:53 +00:00
parent 07a05d5130
commit eb9b3e164e

View File

@ -95,6 +95,7 @@ GrContext::~GrContext() {
fGpu->purgeResources();
delete fTextureCache;
fTextureCache = NULL;
delete fFontCache;
delete fDrawBuffer;
delete fDrawBufferVBAllocPool;
@ -495,7 +496,9 @@ void GrContext::unlockScratchTexture(GrTexture* texture) {
}
void GrContext::purgeCache() {
fTextureCache->purgeAsNeeded();
if (NULL != fTextureCache) {
fTextureCache->purgeAsNeeded();
}
}
GrTexture* GrContext::createUncachedTexture(const GrTextureDesc& descIn,