| Index: Source/core/html/canvas/WebGLRenderingContext.cpp
|
| diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| index 6fc446f5926b724cdaf02b10ba907b997a95b2bf..1faa49d6fe059b38d7383a1e86631ee593da0d0d 100644
|
| --- a/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| +++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
|
| @@ -1660,8 +1660,11 @@ void WebGLRenderingContext::deleteTexture(WebGLTexture* texture)
|
| if (!deleteObject(texture))
|
| return;
|
| for (size_t i = 0; i < m_textureUnits.size(); ++i) {
|
| - if (texture == m_textureUnits[i].m_texture2DBinding)
|
| + if (texture == m_textureUnits[i].m_texture2DBinding) {
|
| m_textureUnits[i].m_texture2DBinding = 0;
|
| + if (!i)
|
| + m_drawingBuffer->setTexture2DBinding(0);
|
| + }
|
| if (texture == m_textureUnits[i].m_textureCubeMapBinding)
|
| m_textureUnits[i].m_textureCubeMapBinding = 0;
|
| }
|
|
|