98f3f818e3a65d19b24f701aba31b425783b0034 chmalee Fri Feb 13 16:31:44 2026 -0800 Oops hfs can be null for assembly hub searches, refs #37114 diff --git src/hg/lib/bigBedFind.c src/hg/lib/bigBedFind.c index 5edf68b624e..318c93a76e7 100644 --- src/hg/lib/bigBedFind.c +++ src/hg/lib/bigBedFind.c @@ -14,31 +14,31 @@ static struct hgPos *bigBedIntervalListToHgPositions(struct cart *cart, struct trackDb *tdb, struct bbiFile *bbi, char *term, struct bigBedInterval *intervalList, char *description, struct hgFindSpec *hfs, char *db) /* Given an open bigBed file, and an interval list, return a pointer to a list of hgPos structures. */ { struct hgPos *posList = NULL; char chromName[bbi->chromBpt->keySize+1]; int lastChromId = -1; struct bigBedInterval *interval; struct slInt *labelColumns = NULL; struct asObject *as = NULL; int ncbiIdIx = -1, geneNameIx = -1; struct sqlConnection *conn = NULL; -if (sameString(hfs->searchName, "mane") || sameString(hfs->searchName, "hgnc")) +if (hfs && (sameString(hfs->searchName, "mane") || sameString(hfs->searchName, "hgnc"))) { // TODO: right now we are only doing this for MANE and HGNC, but if we are gonna add // special descriptions to more tracks in the future then we should have some generic // way of attaching a description to an hfs, whether that hfs is a mysql search or a // bigBed search as = bigBedAsOrDefault(bbi); if (sameString(hfs->searchName, "mane")) { conn = hAllocConn(db); ncbiIdIx = asColumnFindIx(as->columnList, "ncbiId"); } else if (sameString(hfs->searchName, "hgnc")) geneNameIx = asColumnFindIx(as->columnList, "geneName"); }