776a6d9ae8ccc05256a1e1d25b2eaad6cfd3af12 braney Thu Feb 16 16:44:32 2017 -0800 fix problem with composites and the new label regime diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 25542cf..e75f835 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -5850,30 +5850,32 @@ slAddHead(&list, slPairNew(trimLabel, NULL + colNum)); } slReverse(&list); return list; } void labelCfgUi(char *db, struct cart *cart, struct trackDb *tdb) /* If there is a labelFields for a bigBed, this routine is called to put up the label options. */ { if (trackDbSettingClosestToHomeOn(tdb, "linkIdInName")) return; struct asObject *as = asForDb(tdb, db); +if (as == NULL) + return; struct slPair *labelList = buildFieldList(tdb, "labelFields", as); struct slPair *defaultLabelList = buildFieldList(tdb, "defaultLabelFields", as); char varName[1024]; if ((labelList == NULL) || sameString(labelList->name, "none")) return; printf("<B>Label:</B> "); struct slPair *thisLabel = labelList; for(; thisLabel; thisLabel = thisLabel->next) { safef(varName, sizeof(varName), "%s.label.%s", tdb->track, thisLabel->name); boolean isDefault = FALSE; if (defaultLabelList == NULL) isDefault = (thisLabel == labelList); @@ -8629,30 +8631,32 @@ if (isNotEmpty(asText)) asObj = asParseText(asText); freez(&asText); } return asObj; } static struct asObject *asForTdbOrDie(struct sqlConnection *conn, struct trackDb *tdb) // Get autoSQL description if any associated with tdb. // Abort if there's a problem { struct asObject *asObj = NULL; if (tdbIsBigBed(tdb)) { char *fileName = hReplaceGbdb(tdbBigFileName(conn, tdb)); + if (fileName == NULL) + return NULL; asObj = bigBedFileAsObjOrDefault(fileName); freeMem(fileName); } // TODO: standardize to a wig as //else if (tdbIsBigWig(tdb)) // asObj = asObjFrombigBed(conn,tdb); else if (tdbIsLongTabix(tdb)) asObj = longTabixAsObj(); else if (tdbIsBam(tdb)) asObj = bamAsObj(); else if (tdbIsVcf(tdb)) asObj = vcfAsObj(); else if (startsWithWord("makeItems", tdb->type)) asObj = makeItemsItemAsObj(); else if (sameWord("bedDetail", tdb->type))