Resolves issue with NPE in 3/4 rate decoder.

This commit is contained in:
Denny
2018-09-22 02:52:36 -04:00
parent d752917073
commit 2771c28dba
3 changed files with 34 additions and 9 deletions

View File

@@ -350,9 +350,13 @@ public class Trellis_3_4_Rate
public void add( Con con )
{
Node current = getLastNode();
Tribit input = INPUT_FROM_CONSTELLATION_MAP
.get( con )[ current.getState().getValue() ];
Tribit input = null;
if(current != null)
{
input = INPUT_FROM_CONSTELLATION_MAP.get( con )[ current.getState().getValue() ];
}
/* A non-null input tribit from the lookup table is valid, otherwise
* create 8 alternate branches from the original path to explore