]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
make sure that gl_extensions and gl_platformextensions are not NULL
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Mar 2008 06:34:17 +0000 (06:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Mar 2008 06:34:17 +0000 (06:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8167 d7cf8633-e32d-0410-b094-e92efae38249

vid_agl.c
vid_glx.c
vid_sdl.c
vid_wgl.c

index a3a65f20253cf0b897ae53acf122cbb756260710..984219b1e08973ae2d29a43a3ebf78242bbb7a7c 100644 (file)
--- a/vid_agl.c
+++ b/vid_agl.c
@@ -707,9 +707,15 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate
        gl_vendor = (const char *)qglGetString(GL_VENDOR);
        gl_version = (const char *)qglGetString(GL_VERSION);
        gl_extensions = (const char *)qglGetString(GL_EXTENSIONS);
+       gl_platformextensions = "";
        gl_platform = "AGL";
        gl_videosyncavailable = true;
 
+       if (!gl_extensions)
+               gl_extensions = "";
+       if (!gl_platformextensions)
+               gl_platformextensions = "";
+
        Con_DPrintf("GL_VENDOR: %s\n", gl_vendor);
        Con_DPrintf("GL_RENDERER: %s\n", gl_renderer);
        Con_DPrintf("GL_VERSION: %s\n", gl_version);
index 426e4cfc4da579bc47cbed6abcef7bdbf273c95a..fb011d13c4dc4c5c6013813b95a3b39a2dabcfc1 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -862,6 +862,11 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate
        gl_platform = "GLX";
        gl_platformextensions = qglXQueryExtensionsString(vidx11_display, vidx11_screen);
 
+       if (!gl_extensions)
+               gl_extensions = "";
+       if (!gl_platformextensions)
+               gl_platformextensions = "";
+
        Con_DPrintf("GL_VENDOR: %s\n", gl_vendor);
        Con_DPrintf("GL_RENDERER: %s\n", gl_renderer);
        Con_DPrintf("GL_VERSION: %s\n", gl_version);
index 872f8cffe30e49b061ee73a235c937961fbcb55d..3654b4489c1e6d23cdc10826d5bc9a7318eca49b 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -742,6 +742,11 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate
        gl_platformextensions = "";
        gl_videosyncavailable = false;
 
+       if (!gl_extensions)
+               gl_extensions = "";
+       if (!gl_platformextensions)
+               gl_platformextensions = "";
+
        Con_DPrintf("GL_VENDOR: %s\n", gl_vendor);
        Con_DPrintf("GL_RENDERER: %s\n", gl_renderer);
        Con_DPrintf("GL_VERSION: %s\n", gl_version);
index 74308040dbebd717b545107fc5e2fbd59367fb95..42557a90a94de5010ee3d091024594c5326cd7e4 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -1164,6 +1164,11 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat
                if (qwglGetExtensionsStringARB)
                        gl_platformextensions = (const char *)qwglGetExtensionsStringARB(baseDC);
 
+               if (!gl_extensions)
+                       gl_extensions = "";
+               if (!gl_platformextensions)
+                       gl_platformextensions = "";
+
                // now some nice Windows pain:
                // we have created a window, we needed one to find out if there are
                // any multisample pixel formats available, the problem is that to