diff --git a/src/Xamarin.Android.Tools.ApiXmlAdjuster/JavaApiXmlGeneratorExtensions.cs b/src/Xamarin.Android.Tools.ApiXmlAdjuster/JavaApiXmlGeneratorExtensions.cs index ae4924b3b..562f0c67f 100644 --- a/src/Xamarin.Android.Tools.ApiXmlAdjuster/JavaApiXmlGeneratorExtensions.cs +++ b/src/Xamarin.Android.Tools.ApiXmlAdjuster/JavaApiXmlGeneratorExtensions.cs @@ -124,7 +124,7 @@ static void Save (this JavaTypeParameters typeParameters, XmlWriter writer, stri // jar2xml does not emit that either. var gcs = tp.GenericConstraints.GenericConstraints; var gctr = gcs.Count == 1 ? gcs [0].ResolvedType : null; - if (gctr == null || gctr.ReferencedType.FullName != "java.lang.Object") + if (gctr?.ReferencedType?.FullName != "java.lang.Object") { writer.WriteStartElement ("genericConstraints"); foreach (var g in tp.GenericConstraints.GenericConstraints) {