WW-3406 Solves NPE problem

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lukasz Lenart
2013-03-19 21:58:55 +00:00
parent b56b9b9ff4
commit e091eb41f3
@@ -21,15 +21,14 @@
package org.apache.struts2.jsf;
import java.util.Map;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;
import java.util.Map;
/**
* Overrides the JFS navigation by delegating the result to handling by the core
* result code lookup and execution. If a result cannot be found, the previous
@@ -60,7 +59,7 @@ public class StrutsNavigationHandler extends NavigationHandler {
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
ActionContext ctx = ActionContext.getContext();
if (outcome != null) {
if (ctx == null && ctx.getActionInvocation() == null) {
if (ctx == null || ctx.getActionInvocation() == null) {
delegateToParentNavigation(facesContext, fromAction, outcome);
} else {
ActionConfig config = ctx.getActionInvocation().getProxy().getConfig();