summaryrefslogtreecommitdiff
path: root/src/map/amap/amapLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/amap/amapLib.c')
-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 b6350fe..26ef639 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;
}