src/video/SDL_video.c
changeset 3092 cad1aefa2ed9
parent 3091 32efcc94b3da
child 3099 82e60908fab1
     1.1 --- a/src/video/SDL_video.c	Sun Mar 15 15:50:18 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Tue Mar 17 03:24:22 2009 +0000
     1.3 @@ -664,6 +664,7 @@
     1.4          SDL_SetError("Couldn't find display mode match");
     1.5          return -1;
     1.6      }
     1.7 +
     1.8      if (SDL_memcmp
     1.9          (&fullscreen_mode, &display->fullscreen_mode,
    1.10           sizeof(fullscreen_mode)) == 0) {
    1.11 @@ -1492,6 +1493,13 @@
    1.12      /* Create a new renderer instance */
    1.13      window->renderer = SDL_CurrentDisplay.render_drivers[index]
    1.14          .CreateRenderer(window, flags);
    1.15 +
    1.16 +    if (window->renderer==NULL)
    1.17 +    {
    1.18 +       /* Assuming renderer set its error */
    1.19 +       return -1;
    1.20 +    }
    1.21 +
    1.22      SDL_SelectRenderer(window->id);
    1.23  
    1.24      return 0;