7bb6da83f4a5c8be7932c48c22eb6c917e222ba1
galt
  Tue Oct 6 11:38:32 2020 -0700
oops, another little hgBlat bug with Blats Guess and SearchAllGenomes and only newline for intput. refs #26285

diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c
index ff5a784..1d14f95 100644
--- src/hg/hgBlat/hgBlat.c
+++ src/hg/hgBlat/hgBlat.c
@@ -1393,54 +1393,57 @@
     xType = "rnax"; 
     txTxBoth = sameWord(type, "translated DNA");
     if (txTxBoth)
 	xType = "dnax"; 
     }
 else if (sameWord(type, "protein"))
     {
     seqList = faSeqListFromMemText(seqLetters, FALSE);
     isTx = TRUE;
     qIsProt = TRUE;
     xType = "prot"; 
     }
 else  // BLAT's Guess
     {
     seqList = faSeqListFromMemTextRaw(seqLetters);
+    if (seqList)
+	{
 	isTx = !seqIsDna(seqList); // only tests first element, assumes the rest are the same type.
 	if (!isTx)
 	    {
 	    xType = "dna"; 
 	    for (seq = seqList; seq != NULL; seq = seq->next)
 		{
 		seq->size = dnaFilteredSize(seq->dna);
 		dnaFilter(seq->dna, seq->dna);
 		toLowerN(seq->dna, seq->size);
 		subChar(seq->dna, 'u', 't');
 		}
 	    }
 	else
 	    {
 	    for (seq = seqList; seq != NULL; seq = seq->next)
 		{
 		seq->size = aaFilteredSize(seq->dna);
 		aaFilter(seq->dna, seq->dna);
 		toUpperN(seq->dna, seq->size);
 		}
 	    qIsProt = TRUE;
 	    xType = "prot"; 
 	    }
 	}
+    }
 if (seqList != NULL && seqList->name[0] == 0)
     {
     freeMem(seqList->name);
     seqList->name = cloneString("YourSeq");
     }
 trimUniq(seqList);
 
 /* If feeling lucky only do the first one. */
 if(feelingLucky && seqList != NULL)
     {
     seqList->next = NULL;
     }
 
 /* Figure out size allowed. */
 maxSingleSize = (isTx ? 10000 : 75000);