Browse Source

Fix segfault loading images from compressed data without an explicit sRGB flag

Bart van Strien 10 years ago
parent
commit
c02ba91ef4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/opengl/Image.cpp

+ 1 - 1
src/modules/graphics/opengl/Image.cpp

@@ -110,7 +110,7 @@ Image::Image(const std::vector<love::image::CompressedImageData *> &compressedda
 	, usingDefaultTexture(false)
 	, textureMemorySize(0)
 {
-	this->flags.sRGB = (flags.sRGB || cdata[0]->isSRGB());
+	this->flags.sRGB = (flags.sRGB || compresseddata[0]->isSRGB());
 
 	width = compresseddata[0]->getWidth(0);
 	height = compresseddata[0]->getHeight(0);