[0.2.x] fixed : pykd may crash by calling API routines with typeInfo = None

git-svn-id: https://pykd.svn.codeplex.com/svn@82322 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2013-01-17 12:23:35 +00:00 committed by Mikhail I. Izmestev
parent 169c7b54b6
commit 11829511aa

View File

@ -72,6 +72,9 @@ void CustomBase::throwIfTypeRecursive(TypeInfoPtr type)
void CustomStruct::appendField(const std::string &fieldName, TypeInfoPtr &fieldType ) void CustomStruct::appendField(const std::string &fieldName, TypeInfoPtr &fieldType )
{ {
if ( !fieldType )
throw DbgException( "typeInfo can not be None" );
throwIfFiledExist(fieldName); throwIfFiledExist(fieldName);
throwIfTypeRecursive(fieldType); throwIfTypeRecursive(fieldType);