Bug 728656 - Avoid crashing when there are no GL extensions reported by the GL implementation. r=bjacob
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 20 Feb 2012 08:04:38 +0100
changeset 87222 356382604d2d7db8c70c66dbc6f6b36857331062
parent 87221 216ba95b0cc4adc9f7d83c186d3669d7bd299a05
child 87223 985031d212189a59b7ae8db38a85f650155a6eb7
push id22103
push userbmo@edmorley.co.uk
push dateTue, 21 Feb 2012 12:01:45 +0000
treeherdermozilla-central@4038ffaa5d82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs728656
milestone13.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 728656 - Avoid crashing when there are no GL extensions reported by the GL implementation. r=bjacob
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -553,16 +553,19 @@ GLContext::InitWithPrefix(const char *pr
     return mInitialized;
 }
 
 void
 GLContext::InitExtensions()
 {
     MakeCurrent();
     const GLubyte *extensions = fGetString(LOCAL_GL_EXTENSIONS);
+    if (!extensions)
+        return;
+
     char *exts = strdup((char *)extensions);
 
 #ifdef DEBUG
     static bool once = false;
 #else
     const bool once = true;
 #endif