summaryrefslogtreecommitdiffstats
path: root/src/map
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-09-13 11:47:38 +0300
committerAlan Mishchenko <alanmi@berkeley.edu>2018-09-13 11:47:38 +0300
commitd05fe039e1009822254964c0c7ff141f7008b61f (patch)
treec516e753e28df69c351fa01815bc76394fab6fc3 /src/map
parent1f93bfb9afdc1fbf694204417b870260f592240a (diff)
downloadabc-d05fe039e1009822254964c0c7ff141f7008b61f.tar.gz
abc-d05fe039e1009822254964c0c7ff141f7008b61f.tar.bz2
abc-d05fe039e1009822254964c0c7ff141f7008b61f.zip
Suggested bug fix in 'amap'.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amapLib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c
index b6350fed..26ef639f 100644
--- a/src/map/amap/amapLib.c
+++ b/src/map/amap/amapLib.c
@@ -242,8 +242,11 @@ Amap_Gat_t * Amap_LibFindGate( Amap_Lib_t * p, unsigned uTruth )
Amap_Gat_t * pGate;
int i;
Vec_PtrForEachEntry( Amap_Gat_t *, p->vSorted, pGate, i )
+ {
+ if (( pGate == NULL ) || ( pGate->pFunc == NULL )) continue;
if ( pGate->nPins <= 5 && pGate->pFunc[0] == uTruth )
return pGate;
+ }
return NULL;
}