Index: ui/gl/gl_fence_nv.cc |
diff --git a/ui/gl/gl_fence_nv.cc b/ui/gl/gl_fence_nv.cc |
index 750d47695529a39af6892e89d5179c6bbdd3cb38..7a856c399926d75db709bd89c7371e24fcdbd9bc 100644 |
--- a/ui/gl/gl_fence_nv.cc |
+++ b/ui/gl/gl_fence_nv.cc |
@@ -49,8 +49,14 @@ void GLFenceNV::ServerWait() { |
} |
GLFenceNV::~GLFenceNV() { |
- DCHECK(glIsFenceNV(fence_)); |
- glDeleteFencesNV(1, &fence_); |
+ if (fence_) { |
+ DCHECK(glIsFenceNV(fence_)); |
+ glDeleteFencesNV(1, &fence_); |
+ } |
+} |
+ |
+void GLFenceNV::Invalidate() { |
+ fence_ = 0; |
} |
} // namespace gl |