From Paul Martz, "Another round of plugin enhancements.

3DC: Output now uses osg::notify.
JPEG: Now returns correct error code for empty input file.
FreeType: Prevent possible crash if Options is NULL."
This commit is contained in:
Robert Osfield
2008-05-10 17:23:12 +00:00
parent 4d7b2edd4c
commit e9589ebb49
3 changed files with 6 additions and 6 deletions

View File

@@ -755,7 +755,7 @@ class ReaderWriterJPEG : public osgDB::ReaderWriter
imageData = simage_jpeg_load(fin,&width_ret,&height_ret,&numComponents_ret);
if (imageData==NULL) return ReadResult::FILE_NOT_HANDLED;
if (imageData==NULL) return ReadResult::ERROR_IN_READING_FILE;
int s = width_ret;
int t = height_ret;
@@ -811,7 +811,7 @@ class ReaderWriterJPEG : public osgDB::ReaderWriter
if (fileName.empty()) return ReadResult::FILE_NOT_FOUND;
std::ifstream istream(fileName.c_str(), std::ios::in | std::ios::binary);
if(!istream) return ReadResult::FILE_NOT_HANDLED;
if(!istream) return ReadResult::ERROR_IN_READING_FILE;
ReadResult rr = readJPGStream(istream);
if(rr.validImage()) rr.getImage()->setFileName(file);
return rr;