diff --git a/Utilities/otbossimplugins/ossim/ossimErsSarModel.cpp b/Utilities/otbossimplugins/ossim/ossimErsSarModel.cpp index bfd5ab5381759f6192f279fdd0338d9689568c42..b8dfefec6efc99a1e3028bbc29b0e556e3a5a584 100644 --- a/Utilities/otbossimplugins/ossim/ossimErsSarModel.cpp +++ b/Utilities/otbossimplugins/ossim/ossimErsSarModel.cpp @@ -185,6 +185,13 @@ bool ossimErsSarModel::open(const ossimFilename& file) ossimNotify(ossimNotifyLevel_DEBUG) << "End reading Leader file" << std::endl; } + + //To initialize the whole state, reusing saveState/loadState + //FIXME: This could be at the superclass level instead + ossimKeywordlist kwl; + saveState(kwl); + loadState(kwl); + } // matches: if ( result=isErsLeader(file) == True ) } // matches: if ( file.exists() ) @@ -198,11 +205,7 @@ bool ossimErsSarModel::open(const ossimFilename& file) << std::endl; } - //To initialize the whole state, reusing saveState/loadState - //FIXME: This could be at the superclass level instead - ossimKeywordlist kwl; - saveState(kwl); - loadState(kwl); + return result;