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 d7383c0..2b677b8 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 31d05d1..0fc71e2 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