From cc37d7f43974c64f34049f3b6dd77b3d0f84e934 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 14 Jul 2009 11:19:22 +0000 Subject: [PATCH] Moved the getting of the ReaderWriter to do the actual model loading to later so that it only gets invoked when required. --- src/osgPlugins/curl/ReaderWriterCURL.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/osgPlugins/curl/ReaderWriterCURL.cpp b/src/osgPlugins/curl/ReaderWriterCURL.cpp index 9ac8ead91..73be7686a 100644 --- a/src/osgPlugins/curl/ReaderWriterCURL.cpp +++ b/src/osgPlugins/curl/ReaderWriterCURL.cpp @@ -369,18 +369,6 @@ osgDB::ReaderWriter::ReadResult ReaderWriterCURL::readFile(ObjectType objectType } - // Try to find a reader by file extension. If this fails, we will fetch the file - // anyway and try to get a reader via mime-type. - osgDB::ReaderWriter *reader = - osgDB::Registry::instance()->getReaderWriterForExtension( ext ); - - //if (!reader) - //{ - // osg::notify(osg::NOTICE)<<"Error: No ReaderWriter for file "<className()<getReaderWriterForExtension( ext ); + // If we do not already have a ReaderWriter, try to find one based on the // mime-type: if ( !reader )