From 11829511aa946ed66fb87cc5783ea6684d6d0cbb Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Thu, 17 Jan 2013 12:23:35 +0000 Subject: [PATCH] [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 --- pykd/customtypes.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pykd/customtypes.cpp b/pykd/customtypes.cpp index a98eb10..be646a4 100644 --- a/pykd/customtypes.cpp +++ b/pykd/customtypes.cpp @@ -72,6 +72,9 @@ void CustomBase::throwIfTypeRecursive(TypeInfoPtr type) void CustomStruct::appendField(const std::string &fieldName, TypeInfoPtr &fieldType ) { + if ( !fieldType ) + throw DbgException( "typeInfo can not be None" ); + throwIfFiledExist(fieldName); throwIfTypeRecursive(fieldType);