Index: cc/resources/video_resource_updater.cc |
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc |
index 9aa3644f1744699c694928c506c945d097fe5941..22fc8591f53d6b8b30e4e0b0a01d1d35cf50754f 100644 |
--- a/cc/resources/video_resource_updater.cc |
+++ b/cc/resources/video_resource_updater.cc |
@@ -355,10 +355,15 @@ void VideoResourceUpdater::RecycleResource( |
RecycleResourceData data, |
unsigned sync_point, |
bool lost_resource) { |
+ if (!updater) { |
+ // Resource was already deleted. |
+ return; |
+ } |
+ |
WebKit::WebGraphicsContext3D* context = |
resource_provider->GraphicsContext3D(); |
if (context && sync_point) |
- GLC(context, context->waitSyncPoint(sync_point)); |
+ GLC(context, context->waitSyncPoint(sync_point)); |
if (context && !lost_resource) { |
ResourceProvider::ScopedWriteLockGL lock(resource_provider, |
data.resource_id); |
@@ -368,7 +373,7 @@ void VideoResourceUpdater::RecycleResource( |
GLC(context, context->bindTexture(GL_TEXTURE_2D, 0)); |
} |
- if (!updater || lost_resource) { |
+ if (lost_resource) { |
resource_provider->DeleteResource(data.resource_id); |
return; |
} |