From 9fe0c23af4bd5773f3109a11e44087179ef448ec Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 29 Jun 2016 17:31:16 +0100 Subject: [PATCH] Added better handling of null istream --- src/osgPlugins/ive/DataInputStream.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/ive/DataInputStream.cpp b/src/osgPlugins/ive/DataInputStream.cpp index 3681bf476..ba281ad8e 100644 --- a/src/osgPlugins/ive/DataInputStream.cpp +++ b/src/osgPlugins/ive/DataInputStream.cpp @@ -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() ;