src/video/SDL_video.c
changeset 11171 6f6e8880cd37
parent 11147 5b2841f73a33
child 11175 cbc6a8a5b701
     1.1 --- a/src/video/SDL_video.c	Sun Jul 30 14:36:01 2017 -0400
     1.2 +++ b/src/video/SDL_video.c	Mon Jul 31 12:57:15 2017 -0700
     1.3 @@ -3113,9 +3113,17 @@
     1.4      GLenum attachmentattrib = 0;
     1.5  #endif
     1.6  
     1.7 +    if (!value) {
     1.8 +        return SDL_InvalidParamError("value");
     1.9 +    }
    1.10 +
    1.11      /* Clear value in any case */
    1.12      *value = 0;
    1.13  
    1.14 +    if (!_this) {
    1.15 +        return SDL_UninitializedVideo();
    1.16 +    }
    1.17 +
    1.18      switch (attr) {
    1.19      case SDL_GL_RED_SIZE:
    1.20  #if SDL_VIDEO_OPENGL