[ONOS-7493] Segment routing may uninstall forwarding with no next id

Change-Id: Id78b9ed94633b7e96fdeebe185e28d6de386e3ec
diff --git a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java
index badb38c..6346302 100644
--- a/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java
+++ b/pipelines/fabric/src/main/java/org/onosproject/pipelines/fabric/FabricTreatmentInterpreter.java
@@ -22,6 +22,7 @@
 import org.onlab.packet.VlanId;
 import org.onlab.util.ImmutableByteSequence;
 import org.onosproject.net.PortNumber;
+import org.onosproject.net.flow.DefaultTrafficTreatment;
 import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.flow.instructions.Instruction;
 import org.onosproject.net.flow.instructions.Instructions;
@@ -126,6 +127,10 @@
 
     public static PiAction mapForwardingTreatment(TrafficTreatment treatment)
             throws PiInterpreterException {
+        // Empty treatment, generate table entry with no action
+        if (treatment.equals(DefaultTrafficTreatment.emptyTreatment())) {
+            return null;
+        }
         List<Instruction> insts = treatment.allInstructions();
         OutputInstruction outInst = insts.stream()
                 .filter(inst -> inst.type() == OUTPUT)