- unsigned char uchMaskRed = bHasMask ? image->GetMaskRed() : 0;
- unsigned char uchMaskGreen = bHasMask ? image->GetMaskGreen() : 0;
- unsigned char uchMaskBlue = bHasMask ? image->GetMaskBlue() : 0;
+ unsigned char uchMaskRed = 0, uchMaskGreen = 0, uchMaskBlue = 0;
+
+ if ( bHasMask )
+ {
+ uchMaskRed = image->GetMaskRed();
+ uchMaskGreen = image->GetMaskGreen();
+ uchMaskBlue = image->GetMaskBlue();
+ }
+