title: ASSIMP exporting an imported scene without any changes throws exception
body: <p>I am working on a project where I import a 3D mesh of an avatar using ASSIMP library, update it and export the updated scene again using the same ASSIMP library. To achieve this, as the first step, I have written a code to import a scene and without making any changes I am passing the reference to the export function. But, the export function throws me an error. The main function is as follows (you can verify that I am not making any changes to the imported scene):</p>
  
  <pre><code>int main(int argc, char** argv)
  {
      string filename = "../Content/PinocchioMesh/Model1.obj";
  
      Assimp::Importer Importer;
      //Importer.
      cout &lt;&lt; "\tReading file using ASSIMP" &lt;&lt; endl;
      const aiScene* aiscene = Importer.ReadFile(filename.c_str(), aiProcess_JoinIdenticalVertices | \
          aiProcess_GenSmoothNormals | aiProcess_FlipUVs | aiProcess_SortByPType | aiProcess_Triangulate);
  
      string str = Importer.GetErrorString();
  
      if (!aiscene) {
          printf("Error parsing '%s': '%s'\n", filename.c_str(), Importer.GetErrorString());
          return false;
      }
  
  
      Assimp::Exporter exporter;
      const aiExportFormatDesc* format = exporter.GetExportFormatDescription(0);
      int lIndex = filename.find_last_of('/');
      //const string path = Filename.substr(0,lIndex+1);
      string path = "../Content/PinocchioMesh/";
      cout &lt;&lt; "\tExport path: " &lt;&lt; path &lt;&lt; endl;
      aiReturn ret = exporter.Export(aiscene, format-&gt;id, path, aiscene-&gt;mFlags);
      cout &lt;&lt; exporter.GetErrorString() &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  
  <p>The error is in the Export() function ans says:</p>
  
  <pre><code>First-chance exception at 0x1052591B (Assimp32.dll) in ImportRigExport.exe: 0xC0000005: Access violation reading location 0x00000000.
  </code></pre>
  
  <p>If anyone has used assimp to export scenes, please help me.</p>