Bug 1225291 - IsTransformFeedback doesn't report error when input is null. r=jgilbert
authorEthan Lin <ethlin@mozilla.com>
Tue, 01 Dec 2015 17:56:00 +0100
changeset 276554 0bff21e6da0724c70f394e7835db1577fb302dcc
parent 276553 c23905a01c29f257f64db3e627d07a1eb71eb0d0
child 276555 094fd5a4d3dced8b18c171fa47453e823f387de6
push id69200
push usercbook@mozilla.com
push dateWed, 16 Dec 2015 09:55:53 +0000
treeherdermozilla-inbound@0bff21e6da07 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1225291
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1225291 - IsTransformFeedback doesn't report error when input is null. r=jgilbert
dom/canvas/WebGL2ContextTransformFeedback.cpp
--- a/dom/canvas/WebGL2ContextTransformFeedback.cpp
+++ b/dom/canvas/WebGL2ContextTransformFeedback.cpp
@@ -47,20 +47,20 @@ WebGL2Context::DeleteTransformFeedback(W
 }
 
 bool
 WebGL2Context::IsTransformFeedback(WebGLTransformFeedback* tf)
 {
     if (IsContextLost())
         return false;
 
-    if (!ValidateObjectAllowDeleted("isTransformFeedback", tf))
+    if (!ValidateObjectAllowDeletedOrNull("isTransformFeedback", tf))
         return false;
 
-    if (tf->IsDeleted())
+    if (!tf || tf->IsDeleted())
         return false;
 
     MakeContextCurrent();
     return gl->fIsTransformFeedback(tf->mGLName);
 }
 
 void
 WebGL2Context::BindTransformFeedback(GLenum target, WebGLTransformFeedback* tf)