src/video/SDL_video.c
changeset 3318 f085091f74cd
parent 3316 9cf18687b761
child 3333 b334b4f7dfa0
     1.1 --- a/src/video/SDL_video.c	Sat Sep 26 10:19:19 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Sat Sep 26 10:22:35 2009 +0000
     1.3 @@ -1501,11 +1501,16 @@
     1.4      SDL_Window *window = SDL_GetWindowFromID(windowID);
     1.5      SDL_Renderer *renderer;
     1.6  
     1.7 -    if (!window || !window->renderer) {
     1.8 +    if (!window) {
     1.9 +        SDL_SetError("Invalid window ID");
    1.10          return -1;
    1.11      }
    1.12      renderer = window->renderer;
    1.13 -    if (renderer && renderer->ActivateRenderer) {
    1.14 +    if (!renderer) {
    1.15 +        SDL_SetError("Renderer hasn't been created yet");
    1.16 +        return -1;
    1.17 +    }
    1.18 +    if (renderer->ActivateRenderer) {
    1.19          if (renderer->ActivateRenderer(renderer) < 0) {
    1.20              return -1;
    1.21          }