diff --git a/src/Peachpie.CodeAnalysis/CodeGen/Symbols/SourceTypeSymbol.cs b/src/Peachpie.CodeAnalysis/CodeGen/Symbols/SourceTypeSymbol.cs index 25a45fb51b..5a84edcc35 100644 --- a/src/Peachpie.CodeAnalysis/CodeGen/Symbols/SourceTypeSymbol.cs +++ b/src/Peachpie.CodeAnalysis/CodeGen/Symbols/SourceTypeSymbol.cs @@ -668,7 +668,7 @@ static bool CanBePropertyGetter(MethodSymbol method, out string propertyName) static bool CanBePropertySetter(MethodSymbol method) { - return method.IsStatic == false && method.ParameterCount == 1; + return method != null && method.IsStatic == false && method.ParameterCount == 1; } PropertySymbol SynthesizeProperty(Emit.PEModuleBuilder module, DiagnosticBag diagnostics, string propertyName, MethodSymbol getter, MethodSymbol setter)