Bug 1280110 - Null check mGL when destroying CompositingRenderTargetOGL. r=jnicol, a=sylvestre
authorNicolas Silva <nsilva@mozilla.com>
Tue, 21 Jun 2016 14:29:35 +0200
changeset 341678 9f5af086dcbbb240aa3dff299230e0096330468e
parent 341677 cc0a07b00e380d7cee9ef378c2c38f93c691a991
child 341679 e627ab32ecfb8947a634d53ed59567919c464417
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjnicol, sylvestre
bugs1280110
milestone49.0a2
Bug 1280110 - Null check mGL when destroying CompositingRenderTargetOGL. r=jnicol, a=sylvestre
gfx/layers/opengl/CompositingRenderTargetOGL.cpp
--- a/gfx/layers/opengl/CompositingRenderTargetOGL.cpp
+++ b/gfx/layers/opengl/CompositingRenderTargetOGL.cpp
@@ -11,17 +11,17 @@
 namespace mozilla {
 namespace layers {
 
 using namespace mozilla::gfx;
 using namespace mozilla::gl;
 
 CompositingRenderTargetOGL::~CompositingRenderTargetOGL()
 {
-  if (mGL->MakeCurrent()) {
+  if (mGL && mGL->MakeCurrent()) {
     mGL->fDeleteTextures(1, &mTextureHandle);
     mGL->fDeleteFramebuffers(1, &mFBO);
   }
 }
 
 void
 CompositingRenderTargetOGL::BindTexture(GLenum aTextureUnit, GLenum aTextureTarget)
 {