d22e40bee9127bb6400ae91d2e96b20fa77fc0a8
kent
  Fri Nov 30 11:43:49 2012 -0800
Adding one more error check on input.
diff --git src/kehayden/alphaAsm/alphaAsm.c src/kehayden/alphaAsm/alphaAsm.c
index f2d001a..f67c6a7 100644
--- src/kehayden/alphaAsm/alphaAsm.c
+++ src/kehayden/alphaAsm/alphaAsm.c
@@ -1064,30 +1064,32 @@
         {
 	struct monomer *monomer = hashFindVal(store->monomerHash, word);
 	if (monomer == NULL)
 	    errAbort("%s is in %s but not %s", word, lf->fileName, readsFile);
 	struct monomerRef *ref;
 	AllocVar(ref);
 	ref->val = monomer;
 	slAddHead(&type->list, ref);
 	hashAddUnique(store->typeHash, word, type);
 	}
     if (type->list == NULL)
         errAbort("Short line %d of %s.  Format should be:\ntype list-of-monomers-of-type\n",
 	    lf->lineIx, lf->fileName);
     }
 slReverse(&store->typeList);
+if (store->typeList == NULL)
+    errAbort("%s is empty", lf->fileName);
 lineFileClose(&lf);
 hashFree(&uniq);
 verbose(2, "Added %d types containing %d words from %s\n", 
     slCount(store->typeList), store->typeHash->elCount, fileName);
 
 /* Create type array */
 store->typeCount = slCount(store->typeList);
 struct monomerType **types = AllocArray(store->typeArray, store->typeCount);
 struct monomerType *type;
 int i;
 for (i=0, type = store->typeList; i<store->typeCount; ++i, type = type->next)
     types[i] = type;
 }
 
 void monomerListNormalise(struct monomer *list, int totalCount, int outputSize)