src/video/SDL_video.c
changeset 3318 f085091f74cd
parent 3316 9cf18687b761
child 3333 b334b4f7dfa0
--- a/src/video/SDL_video.c	Sat Sep 26 10:19:19 2009 +0000
+++ b/src/video/SDL_video.c	Sat Sep 26 10:22:35 2009 +0000
@@ -1501,11 +1501,16 @@
     SDL_Window *window = SDL_GetWindowFromID(windowID);
     SDL_Renderer *renderer;
 
-    if (!window || !window->renderer) {
+    if (!window) {
+        SDL_SetError("Invalid window ID");
         return -1;
     }
     renderer = window->renderer;
-    if (renderer && renderer->ActivateRenderer) {
+    if (!renderer) {
+        SDL_SetError("Renderer hasn't been created yet");
+        return -1;
+    }
+    if (renderer->ActivateRenderer) {
         if (renderer->ActivateRenderer(renderer) < 0) {
             return -1;
         }