Merge pull request #696 from yig/patch-1

aiGetExportFormatDescription() no longer uses free'd memory
pull/697/head
Kim Kulling 2015-11-24 09:10:03 +01:00
commit 1daeef42ad
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ ASSIMP_API const aiExportFormatDesc* aiGetExportFormatDescription( size_t index)
{ {
// Note: this is valid as the index always pertains to a built-in exporter, // Note: this is valid as the index always pertains to a built-in exporter,
// for which the returned structure is guaranteed to be of static storage duration. // for which the returned structure is guaranteed to be of static storage duration.
const aiExportFormatDesc* orig( Exporter().GetExportFormatDescription( index ) ); Exporter exporter;
const aiExportFormatDesc* orig( exporter.GetExportFormatDescription( index ) );
if (NULL == orig) { if (NULL == orig) {
return NULL; return NULL;
} }