Merge "Fix for openflow devices not connecting to controller"
[openflowplugin.git] / applications / forwardingrules-manager / src / main / java / org / opendaylight / openflowplugin / applications / frm / util / FrmUtil.java
index bc926b87fdd00966f66caed49e5110d5a0776581..4093180395582a622f7617247c51b5c2c6853b1e 100644 (file)
@@ -112,11 +112,11 @@ public final class FrmUtil {
                     actions = ((WriteActionsCase)instruction.getInstruction())
                             .getWriteActions().nonnullAction().values();
                 }
-                for (Action action : actions) {
-                    if (action.getAction().implementedInterface()
-                            .equals(ActionType.GROUP_ACTION.getActionType())) {
-                        return ((GroupActionCase) action.getAction()).getGroupAction()
-                                .getGroupId();
+                if (actions != null) {
+                    for (Action action : actions) {
+                        if (action.getAction().implementedInterface().equals(ActionType.GROUP_ACTION.getActionType())) {
+                            return ((GroupActionCase) action.getAction()).getGroupAction().getGroupId();
+                        }
                     }
                 }
             }