Index: ppapi/shared_impl/ppb_video_decoder_shared.cc |
diff --git a/ppapi/shared_impl/ppb_video_decoder_shared.cc b/ppapi/shared_impl/ppb_video_decoder_shared.cc |
index ffd422d09979758f42fc6db044c9b1c5540d69d3..3a2bb42fdd034cfaf40d18966d2152cfd1aacd97 100644 |
--- a/ppapi/shared_impl/ppb_video_decoder_shared.cc |
+++ b/ppapi/shared_impl/ppb_video_decoder_shared.cc |
@@ -44,9 +44,12 @@ void PPB_VideoDecoder_Shared::InitCommon( |
} |
void PPB_VideoDecoder_Shared::Destroy() { |
- graphics_context_ = 0; |
+ if (graphics_context_) { |
+ PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource( |
+ graphics_context_); |
dmichael (off chromium)
2013/03/27 22:59:04
What about either using ScopedPPResource, or actua
danakj
2013/03/27 23:02:33
Will ScopedPPResource work with this model where D
dmichael (off chromium)
2013/03/28 02:40:49
Didn't see that ScopedPPResource has no public way
danakj
2013/03/28 15:58:50
I feel hesitant to make that change as it would be
|
+ graphics_context_ = 0; |
+ } |
gles2_impl_ = NULL; |
- PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(graphics_context_); |
} |
bool PPB_VideoDecoder_Shared::SetFlushCallback( |