diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/src/main/java/org/wso2/carbon/policy/decision/point/simple/PolicyEvaluationServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.decision.point/src/main/java/org/wso2/carbon/policy/decision/point/simple/PolicyEvaluationServiceImpl.java index 6bc2113e81a..70eff77618a 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/src/main/java/org/wso2/carbon/policy/decision/point/simple/PolicyEvaluationServiceImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/src/main/java/org/wso2/carbon/policy/decision/point/simple/PolicyEvaluationServiceImpl.java @@ -43,9 +43,11 @@ public class PolicyEvaluationServiceImpl implements PolicyEvaluationPoint { @Override public List getEffectiveFeatures(DeviceIdentifier deviceIdentifier) throws PolicyEvaluationException { - - List effectiveFeatures = evaluation.getEffectivePolicy(deviceIdentifier). - getProfile().getProfileFeaturesList(); + List effectiveFeatures = null; + Policy effectivePolicy = evaluation.getEffectivePolicy(deviceIdentifier); + if (effectivePolicy != null) { + effectiveFeatures = effectivePolicy.getProfile().getProfileFeaturesList(); + } return effectiveFeatures; }