use ?: in STEPattribute::NonRefType() to ensure that aDesc ptr is valid

This commit is contained in:
Mark Pictor
2011-11-30 21:29:33 -05:00
parent deb55618fe
commit 6aa4695322
+2 -4
View File
@@ -95,10 +95,8 @@ const BASE_TYPE STEPattribute::Type() const {
}
const BASE_TYPE STEPattribute::NonRefType() const {
if( _redefAttr ) {
return _redefAttr->NonRefType();
}
return aDesc->NonRefType();
return ( _redefAttr ? _redefAttr->NonRefType() :
( aDesc ? aDesc->NonRefType() : UNKNOWN_TYPE ) );
}
const BASE_TYPE STEPattribute::BaseType() const {