Skip to content

Commit c8527e1

Browse files
committed
fixed possible null attributeTypeDefinition for Visual Basic Winforms projects #126
1 parent 1c94bab commit c8527e1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/MethodBoundaryAspect.Fody/ModuleWeaver.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ private bool WeaveMethod(
258258

259259
private bool IsMethodBoundaryAspect(TypeDefinition attributeTypeDefinition)
260260
{
261-
var currentType = attributeTypeDefinition.BaseType;
261+
var currentType = attributeTypeDefinition?.BaseType;
262+
if (currentType == null) // can be null for Visual Basic Winforms projects, see https://github.com/vescon/MethodBoundaryAspect.Fody/issues/126
263+
return false;
264+
262265
do
263266
{
264267
if (currentType.FullName == AttributeFullNames.OnMethodBoundaryAspect)

0 commit comments

Comments
 (0)