fde4ec4b4860e59c9cc451241b1e584bc1e7cb85
braney
  Mon Feb 13 16:03:21 2023 -0800
fix crash if bigPsl doesn't have sequence or "otherTwoBitUrl" in the
track stanza

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 2902197..fbdafd1 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -3259,33 +3259,38 @@
 struct twoBitFile *getOtherTwoBitUrl(struct trackDb *tdb)
 /* Return open two bit file if otherTwoBitUrl setting is present */
 {
 return getTwoBitFileFromUrlInSettings(tdb, "otherTwoBitUrl");
 }
 
 struct psl *getPslAndSeq(struct trackDb *tdb, char *chromName, struct bigBedInterval *bb, 
     unsigned seqTypeField, DNA **retSeq, char **retCdsStr)
 /* Read in psl and query sequence out of a bbiInverval on a give chromosome */
 {
 struct psl *psl= pslFromBigPsl(chromName, bb, seqTypeField, retSeq, retCdsStr);
 DNA *dna = *retSeq;
 if (dna == NULL)
     {
     struct twoBitFile *otherTbf = getOtherTwoBitUrl(tdb);
-    struct dnaSeq *seq = twoBitReadSeqFrag(otherTbf, psl->qName, 0, 0);
+    struct dnaSeq *seq = NULL;
+    if (otherTbf)
+        {
+        seq = twoBitReadSeqFrag(otherTbf, psl->qName, 0, 0);
+        if (seq)
             *retSeq = dna = seq->dna;
         }
+    }
 return psl;
 }
 
 void genericBigPslClick(struct sqlConnection *conn, struct trackDb *tdb,
                      char *item, int start, int end)
 /* Handle click in big psl track. */
 {
 struct psl* pslList = NULL;
 char *fileName = bbiNameFromSettingOrTable(tdb, conn, tdb->table);
 struct bbiFile *bbi =  bigBedFileOpenAlias(fileName, chromAliasFindAliases);
 struct lm *lm = lmInit(0);
 int ivStart = start, ivEnd = end;
 
 if (start == end)
     {