http://packetstorm.tacticalflex.com/UNIX/admin/xscreensaver-3.27.tar.gz
[xscreensaver] / hacks / glx / pulsar.c
index a6b971b77e8d1b7f7ac889c557d79b4aa31e3f1e..a6125c8154ed3a3e6b02feb0a01761ee19fbed3d 100644 (file)
@@ -606,9 +606,13 @@ void Create_Texture(char *filename)
   /* mipmaps make the image look much nicer */
   if (do_mipmap)
        a=gluBuild2DMipmaps(GL_TEXTURE_2D, format, width, height, format, GL_UNSIGNED_BYTE, image);
-  else 
-       glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0,
-                                format, GL_UNSIGNED_BYTE, image);
+  else
+    {
+      clear_gl_error();
+      glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0,
+                   format, GL_UNSIGNED_BYTE, image);
+      check_gl_error("texture");
+    }
 
   free(image);
 }