src/video/SDL_video.c
changeset 7865 f2a42ca4ddf0
parent 7860 2b0bcdea3a79
child 7941 7c249ca44069
child 8535 e8ee0708ef5c
     1.1 --- a/src/video/SDL_video.c	Sun Oct 20 23:52:02 2013 -0700
     1.2 +++ b/src/video/SDL_video.c	Mon Oct 21 00:15:24 2013 -0700
     1.3 @@ -2333,12 +2333,16 @@
     1.4          retval = 0;
     1.5      } else {
     1.6          if (!_this->GL_LoadLibrary) {
     1.7 -            return  SDL_SetError("No dynamic GL support in video driver");
     1.8 +            return SDL_SetError("No dynamic GL support in video driver");
     1.9          }
    1.10          retval = _this->GL_LoadLibrary(_this, path);
    1.11      }
    1.12      if (retval == 0) {
    1.13          ++_this->gl_config.driver_loaded;
    1.14 +    } else {
    1.15 +        if (_this->GL_UnloadLibrary) {
    1.16 +            _this->GL_UnloadLibrary(_this);
    1.17 +        }
    1.18      }
    1.19      return (retval);
    1.20  }