[cgma-dev] r3203 - cgm/trunk/itaps
jvporter at wisc.edu
jvporter at wisc.edu
Wed Oct 14 14:00:07 CDT 2009
Author: jvporter
Date: 2009-10-14 14:00:07 -0500 (Wed, 14 Oct 2009)
New Revision: 3203
Modified:
cgm/trunk/itaps/iGeom_CGMA.cc
Log:
Add sanity check to iGeom_getFaceType
Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc 2009-10-13 22:09:15 UTC (rev 3202)
+++ cgm/trunk/itaps/iGeom_CGMA.cc 2009-10-14 19:00:07 UTC (rev 3203)
@@ -2823,6 +2823,8 @@
RefEntity *this_ent = ENTITY_HANDLE(gentity_handle);
RefFace *this_face = dynamic_cast<RefFace*>(this_ent);
+ if (!this_face)
+ RETURN(iBase_INVALID_ENTITY_TYPE);
GeometryType this_type = this_face->get_surface_ptr()->geometry_type();
if (this_type < CONE_SURFACE_TYPE || this_type > UNDEFINED_SURFACE_TYPE) {
RETURN(iBase_FAILURE);
More information about the cgma-dev
mailing list