src/video/SDL_video.c
changeset 2119 9341a884a4d9
parent 2075 46661504398c
child 2130 3ee59c43d784
     1.1 --- a/src/video/SDL_video.c	Wed Jun 13 08:02:43 2007 +0000
     1.2 +++ b/src/video/SDL_video.c	Thu Jun 14 06:32:36 2007 +0000
     1.3 @@ -1353,9 +1353,14 @@
     1.4  void
     1.5  SDL_AddRenderDriver(int displayIndex, const SDL_RenderDriver * driver)
     1.6  {
     1.7 -    SDL_VideoDisplay *display = &_this->displays[displayIndex];
     1.8 +    SDL_VideoDisplay *display;
     1.9      SDL_RenderDriver *render_drivers;
    1.10  
    1.11 +    if (displayIndex >= _this->num_displays) {
    1.12 +        return;
    1.13 +    }
    1.14 +    display = &_this->displays[displayIndex];
    1.15 +
    1.16      render_drivers =
    1.17          SDL_realloc(display->render_drivers,
    1.18                      (display->num_render_drivers +