Fix NPE if attribute statement is null
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / idp / profile / saml1 / AbstractSAML1ProfileHandler.java
index 93687ac..79b6ed1 100644 (file)
@@ -538,8 +538,10 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
                         .values());
             }
 
-            Subject statementSubject = buildSubject(requestContext, subjectConfMethod);
-            statment.setSubject(statementSubject);
+            if(statment != null){
+                Subject statementSubject = buildSubject(requestContext, subjectConfMethod);
+                statment.setSubject(statementSubject);
+            }
 
             return statment;
         } catch (AttributeRequestException e) {