From: havoc Date: Sat, 1 Mar 2008 06:34:17 +0000 (+0000) Subject: make sure that gl_extensions and gl_platformextensions are not NULL X-Git-Tag: xonotic-v0.1.0preview~2357 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7c3669f2d20d7d0951803f40343d75c3f36bc18;p=xonotic%2Fdarkplaces.git make sure that gl_extensions and gl_platformextensions are not NULL git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8167 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_agl.c b/vid_agl.c index a3a65f20..984219b1 100644 --- 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); diff --git a/vid_glx.c b/vid_glx.c index 426e4cfc..fb011d13 100644 --- 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); diff --git a/vid_sdl.c b/vid_sdl.c index 872f8cff..3654b448 100644 --- 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); diff --git a/vid_wgl.c b/vid_wgl.c index 74308040..42557a90 100644 --- 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