Web Inspector: REGRESSION (r220233): Check for null pointer passed to WebGLRenderingC...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 18:57:03 +0000 (18:57 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Aug 2017 18:57:03 +0000 (18:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175196
<rdar://problem/33727603>

Reviewed by Devin Rousso.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::deleteProgram):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220281 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

index d7383c0f99ae1384de8c58babf2354cb4aa40e00..2b677b8713a251d5ff6484eee40b8dad208fb581 100644 (file)
@@ -1,3 +1,14 @@
+2017-08-04  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: REGRESSION (r220233): Check for null pointer passed to WebGLRenderingContextBase::deleteProgram
+        https://bugs.webkit.org/show_bug.cgi?id=175196
+        <rdar://problem/33727603>
+
+        Reviewed by Devin Rousso.
+
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::deleteProgram):
+
 2017-08-04  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r220271.
index 31d05d197f4098fb9503405d653d8cec234df48d..0fc71e27e0dac4c96a7b47649aebc7319bab51aa 100644 (file)
@@ -1575,8 +1575,8 @@ void WebGLRenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer)
 
 void WebGLRenderingContextBase::deleteProgram(WebGLProgram* program)
 {
-    ASSERT(program);
-    InspectorInstrumentation::willDeleteProgram(*this, *program);
+    if (program)
+        InspectorInstrumentation::willDeleteProgram(*this, *program);
 
     deleteObject(program);
     // We don't reset m_currentProgram to 0 here because the deletion of the