Bug 595194 - CGL context creation crashes on Mac Tryserver - r=bas.schouten a=blocking2.0
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 10 Sep 2010 12:19:09 -0400
changeset 52381 0dec15896c4551fa60469b0a74c1ad38b9d1fd17
parent 52380 30577e9992363269cd6bee66c1f9103d3647b655
child 52382 a6fd7402dfe65ae5ac12c3c89105260040a69f25
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas.schouten, blocking2.0
bugs595194
milestone2.0b6pre
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 595194 - CGL context creation crashes on Mac Tryserver - r=bas.schouten a=blocking2.0
gfx/thebes/GLContextProviderCGL.mm
--- a/gfx/thebes/GLContextProviderCGL.mm
+++ b/gfx/thebes/GLContextProviderCGL.mm
@@ -510,17 +510,17 @@ GLContextProviderCGL::GetGlobalContext()
     if (!gGlobalContext) {
         // There are bugs in some older drivers with pbuffers less
         // than 16x16 in size; also 16x16 is POT so that we can do
         // a FBO with it on older video cards.  A FBO context for
         // sharing is preferred since it has no associated target.
         gGlobalContext = CreateOffscreenFBOContext(gfxIntSize(16, 16),
                                                    ContextFormat(ContextFormat::BasicRGB24),
                                                    PR_FALSE);
-        if (gGlobalContext && !static_cast<GLContextCGL*>(gGlobalContext.get())->Init()) {
+        if (!gGlobalContext || !static_cast<GLContextCGL*>(gGlobalContext.get())->Init()) {
             NS_WARNING("Couldn't init gGlobalContext.");
             gGlobalContext = nsnull;
             return nsnull; 
         }
 
         gGlobalContext->SetIsGlobalSharedContext(PR_TRUE);
     }