Added better handling of null istream

This commit is contained in:
Robert Osfield
2016-06-29 17:31:16 +01:00
parent 3c1d3b981c
commit 9fe0c23af4

View File

@@ -159,8 +159,10 @@ DataInputStream::DataInputStream(std::istream* istream, const osgDB::ReaderWrite
OSG_DEBUG << "ive::DataInputStream.setLoadExternalReferenceFiles()=" << getLoadExternalReferenceFiles() << std::endl;
}
if(!istream){
if(!istream)
{
throwException("DataInputStream::DataInputStream(): null pointer exception in argument.");
return;
}
endianType = readUInt() ;