Skip to content

Commit

Permalink
fixed possible null attributeTypeDefinition for Visual Basic Winforms…
Browse files Browse the repository at this point in the history
… projects #126
  • Loading branch information
Ralf1108 committed Nov 26, 2024
1 parent 1c94bab commit c8527e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/MethodBoundaryAspect.Fody/ModuleWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ private bool WeaveMethod(

private bool IsMethodBoundaryAspect(TypeDefinition attributeTypeDefinition)
{
var currentType = attributeTypeDefinition.BaseType;
var currentType = attributeTypeDefinition?.BaseType;
if (currentType == null) // can be null for Visual Basic Winforms projects, see https://github.com/vescon/MethodBoundaryAspect.Fody/issues/126
return false;

do
{
if (currentType.FullName == AttributeFullNames.OnMethodBoundaryAspect)
Expand Down

0 comments on commit c8527e1

Please sign in to comment.