src/video/x11/SDL_x11opengl.c
changeset 9354 5709598d628a
parent 9330 26eb20aad02f
child 9355 0d1e81f10b7e
equal deleted inserted replaced
9353:4528766f5d2c 9354:5709598d628a
   277 HasExtension(const char *extension, const char *extensions)
   277 HasExtension(const char *extension, const char *extensions)
   278 {
   278 {
   279     const char *start;
   279     const char *start;
   280     const char *where, *terminator;
   280     const char *where, *terminator;
   281 
   281 
       
   282     if (!extensions)
       
   283         return SDL_FALSE;
       
   284 
   282     /* Extension names should not have spaces. */
   285     /* Extension names should not have spaces. */
   283     where = SDL_strchr(extension, ' ');
   286     where = SDL_strchr(extension, ' ');
   284     if (where || *extension == '\0')
   287     if (where || *extension == '\0')
   285         return SDL_FALSE;
       
   286 
       
   287     if (!extensions)
       
   288         return SDL_FALSE;
   288         return SDL_FALSE;
   289 
   289 
   290     /* It takes a bit of care to be fool-proof about parsing the
   290     /* It takes a bit of care to be fool-proof about parsing the
   291      * OpenGL extensions string. Don't be fooled by sub-strings,
   291      * OpenGL extensions string. Don't be fooled by sub-strings,
   292      * etc. */
   292      * etc. */