5534d8dbbffc4d47d416eb4d75e981d10c9a8145
chmalee
  Tue Feb 27 15:58:38 2024 -0800
Fix labelByCfgUi to ignore composite tracks. This removes an unnecessary stack dump from the error logs, refs #30612

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 1997719..5ada320 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -7071,30 +7071,33 @@
     unsigned colNum = asColumnFindIx(as->columnList, trimLabel);
     if (colNum == -1)
         errAbort("cannot find field named '%s' in AS file '%s'", 
             trimLabel, as->name);
 
     slAddHead(&list, slPairNew(trimLabel, NULL + colNum));
     }
 
 slReverse(&list);
 return list;
 }
 
 void labelCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *prefix)
 /* If there is a labelFields for a bigBed, this routine is called to put up the label options. */
 {
+// composites can't label because they don't have an autoSql
+if (tdbIsComposite(tdb))
+    return;
 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;