From b37d42f6b548a42732abdee2fab84c322021443e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 7 Jun 2020 18:03:47 +0200 Subject: [PATCH] Perform sanity check only in debug closes https://github.com/assimp/assimp/issues/3255 --- code/AssetLib/Blender/BlenderDNA.inl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/AssetLib/Blender/BlenderDNA.inl b/code/AssetLib/Blender/BlenderDNA.inl index a41ceab7f..e59adab1d 100644 --- a/code/AssetLib/Blender/BlenderDNA.inl +++ b/code/AssetLib/Blender/BlenderDNA.inl @@ -4,7 +4,6 @@ Open Asset Import Library (assimp) Copyright (c) 2006-2020, assimp team - All rights reserved. Redistribution and use of this software in source and binary forms, @@ -239,11 +238,13 @@ bool Structure :: ReadFieldPtr(TOUT (&out)[N], const char* name, try { f = &(*this)[name]; +#ifdef _DEBUG // sanity check, should never happen if the genblenddna script is right if ((FieldFlag_Pointer|FieldFlag_Pointer) != (f->flags & (FieldFlag_Pointer|FieldFlag_Pointer))) { throw Error((Formatter::format(),"Field `",name,"` of structure `", this->name,"` ought to be a pointer AND an array")); } +#endif // _DEBUG db.reader->IncPtr(f->offset);