e0b2283ee25ab6e76c2e297f309293736532925f
braney
  Fri Dec 10 13:17:05 2021 -0800
oops, put this error message in the wrong place

diff --git src/hg/hgTracks/cds.c src/hg/hgTracks/cds.c
index 410f3c5..5b42945 100644
--- src/hg/hgTracks/cds.c
+++ src/hg/hgTracks/cds.c
@@ -968,30 +968,32 @@
     mrnaSeq = maybeGetExtFileSeq(seqSource, name);
 else if (sameString("nameIsSequence", seqSource))
     {
     mrnaSeq = newDnaSeq(cloneString(name), strlen(name), name);
     if (lf->orientation == -1)
 	reverseComplement(mrnaSeq->dna, mrnaSeq->size);
     }
 else if (sameString("seq1Seq2", seqSource))
     {
     mrnaSeq = lf->extra;
     if (lf->orientation == -1)
 	reverseComplement(mrnaSeq->dna, mrnaSeq->size);
     }
 else if (sameString("lfExtra", seqSource))
     {
+    if (lf->extra == NULL)
+        errAbort("baseColorDrawSetup: sequence for track '%s' not loaded when sequence option is set in trackDb\n", tg->track);
     mrnaSeq = newDnaSeq(cloneString(lf->extra), strlen(lf->extra), lf->extra);
     if (lf->orientation == -1)
 	reverseComplement(mrnaSeq->dna, mrnaSeq->size);
     }
 else if (sameString("lrg", seqSource))
     {
     struct lrg *lrg = lf->original;
     mrnaSeq = lrgReconstructSequence(lrg, database);
     }
 else if (startsWith("table ", seqSource))
     {
     char *table = seqSource;
     nextWord(&table);
     mrnaSeq = hGenBankGetMrna(database, name, table);
     }
@@ -1943,32 +1945,30 @@
     || indelShowQueryInsert || indelShowPolyA)
     {
     if (sameString("lrg", tg->tdb->track))
 	*retPsl = lrgToPsl(lf->original, hChromSize(database, chromName));
     else
 	*retPsl = (struct psl *)(lf->original);
     if (*retPsl == NULL)
 	return baseColorDrawOff;
     }
 if (drawOpt == baseColorDrawItemBases ||
     drawOpt == baseColorDrawDiffBases ||
     drawOpt == baseColorDrawItemCodons ||
     drawOpt == baseColorDrawDiffCodons ||
     indelShowPolyA)
     {
-    if (lf->extra == NULL)
-        errAbort("baseColorDrawSetup: sequence for track '%s' not loaded when sequence option is set in trackDb\n", tg->track);
     *retMrnaSeq = maybeGetSeqUpper(lf, tg->table, tg);
     if (*retMrnaSeq != NULL && *retPsl != NULL) // we have both sequence and PSL
 	{
         if ((*retMrnaSeq)->size != (*retPsl)->qSize)
             errAbort("baseColorDrawSetup: %s: mRNA size (%d) != psl qSize (%d)",
                      (*retPsl)->qName, (*retMrnaSeq)->size, (*retPsl)->qSize);
 	if ((*retPsl)->strand[0] == '-' || (*retPsl)->strand[1] == '-')
 	    reverseComplement((*retMrnaSeq)->dna, strlen((*retMrnaSeq)->dna));
 	}
     // if no sequence, no base color drawing
     // Note: we could have sequence but no PSL (eg, tagAlign format)
     else if (*retMrnaSeq == NULL) 
 	return baseColorDrawOff;
     }