Show
Ignore:
Timestamp:
06/12/09 11:57:45 (5 years ago)
Author:
robert
Message:

From Laurens Voerman, "there seems to be a bug in the proxynode writer introduced in svn rev 10330. It craches on a null pointer for options (on my windows system).
Fixed version of the file "src\osgPlugins\osg\ProxyNode?.cpp" attached, based on svn rev 10332."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/osg/ProxyNode.cpp

    r10331 r10339  
    165165    bool useOriginalExternalReferences = true; 
    166166    bool writeExternalReferenceFiles = false; 
    167     std::string optionsString = fw.getOptions()->getOptionString(); 
    168     includeExternalReferences = optionsString.find("includeExternalReferences")!=std::string::npos; 
    169     bool newExternals = optionsString.find("writeExternalReferenceFiles")!=std::string::npos; 
    170     if (newExternals)  
    171     { 
    172         useOriginalExternalReferences = false; 
    173         writeExternalReferenceFiles = true; 
    174     }  
    175  
     167    if (fw.getOptions()) 
     168    { 
     169        std::string optionsString = fw.getOptions()->getOptionString(); 
     170        includeExternalReferences = optionsString.find("includeExternalReferences")!=std::string::npos; 
     171        bool newExternals = optionsString.find("writeExternalReferenceFiles")!=std::string::npos; 
     172        if (newExternals)  
     173        { 
     174            useOriginalExternalReferences = false; 
     175            writeExternalReferenceFiles = true; 
     176        }  
     177    } 
    176178    const ProxyNode& proxyNode = static_cast<const ProxyNode&>(obj); 
    177179