From 6c0d85e97dec955c865d1c8895d09212044cc895 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 12 May 2010 12:11:46 +0000 Subject: [PATCH] regression on "imps/A3" test * avoid SIGSEGV in case of invalid input mesh --- src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 5e2031c23..1c0cf5e5b 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -1483,6 +1483,9 @@ bool StdMeshers_Quadrangle_2D::ComputeQuadPref (SMESH_Mesh & aMesh, const vector& uv_et = quad->side[2]->GetUVPtStruct(true,1 ); const vector& uv_el = quad->side[3]->GetUVPtStruct(false,0); + if ( uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl ) + return error( COMPERR_BAD_INPUT_MESH ); + // arrays for normalized params //cout<<"Dump B:"<