src/render/SDL_render.c
changeset 5413 64c0e474c459
parent 5369 e049a7b85fd1
child 5423 b69fa50e80d7
--- a/src/render/SDL_render.c	Mon Feb 28 09:26:35 2011 -0800
+++ b/src/render/SDL_render.c	Mon Feb 28 14:47:39 2011 -0800
@@ -260,6 +260,9 @@
 
     CHECK_RENDERER_MAGIC(renderer, NULL);
 
+    if (!format) {
+        format = renderer->info.texture_formats[0];
+    }
     if (SDL_ISPIXELFORMAT_INDEXED(format)) {
         SDL_SetError("Palettized textures are not supported");
         return NULL;