Index: src/src/nvimage/ImageIO.cpp =================================================================== --- src/src/nvimage/ImageIO.cpp (revision 16371) +++ src/src/nvimage/ImageIO.cpp (working copy) @@ -132,13 +132,13 @@ { nvDebugCheck(fileName != NULL); - StdInputStream stream(fileName); - - if (stream.isError()) { - return false; - } - - return loadFloat(fileName, stream); + StdInputStream stream(fileName); + + if (stream.isError()) { + return NULL; + } + + return loadFloat(fileName, stream); } FloatImage * nv::ImageIO::loadFloat(const char * fileName, Stream & s) @@ -230,13 +230,13 @@ case TGA_TYPE_RLE_INDEXED: rle = true; // no break is intended! - case TGA_TYPE_INDEXED: - if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) { - nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" ); - return false; - } - pal = true; - break; + case TGA_TYPE_INDEXED: + if( tga.colormap_type!=1 || tga.colormap_size!=24 || tga.colormap_length>256 ) { + nvDebug( "*** ImageIO::loadTGA: Error, only 24bit paletted images are supported.\n" ); + return NULL; + } + pal = true; + break; case TGA_TYPE_RLE_RGB: rle = true; @@ -251,13 +251,13 @@ case TGA_TYPE_GREY: grey = true; break; - - default: - nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" ); - return false; - } - - const uint pixel_size = (tga.pixel_size/8); + + default: + nvDebug( "*** ImageIO::loadTGA: Error, unsupported image type.\n" ); + return NULL; + } + + const uint pixel_size = (tga.pixel_size/8); nvDebugCheck(pixel_size <= 4); const uint size = tga.width * tga.height * pixel_size;