diff --git a/src/osgPlugins/ive/DataInputStream.cpp b/src/osgPlugins/ive/DataInputStream.cpp index 2d438a91e..b4ddeaf20 100644 --- a/src/osgPlugins/ive/DataInputStream.cpp +++ b/src/osgPlugins/ive/DataInputStream.cpp @@ -179,7 +179,11 @@ DataInputStream::DataInputStream(std::istream* istream, const osgDB::ReaderWrite std::string data; data.reserve(maxSize); - uncompress(*istream, data); + + if (!uncompress(*istream, data)) + { + throw Exception("Error in uncompressing .ive"); + } _istream = new std::stringstream(data); _owns_istream = true; @@ -221,19 +225,21 @@ bool DataInputStream::uncompress(std::istream& fin, std::string& destination) co 15 + 32 // autodected zlib or gzip header ); if (ret != Z_OK) + { + osg::notify(osg::INFO)<<"failed to init"<