diff --git a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index ee973ad94a9a..6f58c6162c76 100644 --- a/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -209,7 +209,8 @@ info_callback(png_structp png_ptr, png_infop info_ptr) display_exponent = LUT_exponent * CRT_exponent; if (png_get_gAMA(png_ptr, info_ptr, &aGamma)) { - if (info_ptr->gamma < 0) aGamma = 0.45455; + if (aGamma < 0) + aGamma = 0.45455; png_set_gamma(png_ptr, display_exponent, aGamma); } else