From df13d315db5d407c0087af030bcb7cf16df81d80 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Thu, 23 Feb 2012 14:10:18 +0000 Subject: [PATCH] # workaround crash in aiReleaseImport due to an suspected bug in gcc. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52339. See assimp-discussions for the details. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1184 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/Assimp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/Assimp.cpp b/code/Assimp.cpp index 3d5dfe7ae..ad36a1850 100644 --- a/code/Assimp.cpp +++ b/code/Assimp.cpp @@ -267,7 +267,10 @@ void aiReleaseImport( const aiScene* pScene) } else { // deleting the Importer also deletes the scene - delete priv->mOrigImporter; + // Note: the reason that this is not written as 'delete priv->mOrigImporter' + // is a suspected bug in gcc 4.4+ (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52339) + Importer* importer = priv->mOrigImporter; + delete importer; } ASSIMP_END_EXCEPTION_REGION(void);