Commits

Bart van Strien committed 0aa2150

Oops

  • Participants
  • Parent commits 8ad1cf6

Comments (0)

Files changed (1)

File src/modules/image/devil/ImageData.cpp

 		ilBindImage(image);
 
 		bool success = (ilTexImage(width, height, 1, bpp, IL_RGBA, IL_UNSIGNED_BYTE, 0) == IL_TRUE);
-		int err = ilGetError();
 
 		if(!success) {
+			int err = ilGetError();
 			if (err != IL_NO_ERROR){
 				switch (err) {
 					case IL_ILLEGAL_OPERATION:
 		bool success = (ilTexImage(width, height, 1, bpp, IL_RGBA, IL_UNSIGNED_BYTE, data) == IL_TRUE);
 
 		if(!success) {
+			int err = ilGetError();
 			if (err != IL_NO_ERROR){
 				switch (err) {
 					case IL_ILLEGAL_OPERATION: