742ae3e74facf1c4a9feb31e2f4f454fdd91bb2d
braney
  Wed Aug 15 13:53:23 2012 -0700
fix #8796.  Hub tracks don't have a tdb in the track hash, so we shouldn't expect to find one there.
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 926e4fd..cfb4a38 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -4995,30 +4995,35 @@
 safef(query, sizeof(query),
       "select moddate from gbCdnaInfo where (acc = '%s')", acc);
 return sqlQuickString(conn, query);
 }
 
 struct trackDb *findTdbForTable(char *db,struct trackDb *parent,char *table, struct customTrack *(*ctLookupName)(char *table))
 /* Find or creates the tdb for this table.  Might return NULL! (e.g. all tables)
  * References an externally defined function ctLookupName() which looks up a
  * custom track by name
  * If this is a custom track, pass in function ctLookupName(table) which looks up a
  * custom track by name, otherwise pass NULL
  */
 {
 if(isEmpty(table))
     return parent;
+
+// hub tracks aren't in the trackDb hash, just use the parent tdb
+if (isHubTrack(table))
+    return parent;
+
 struct trackDb *tdb = NULL;
 if (isCustomTrack(table))
     {
     if (!ctLookupName)
 	errAbort("No custom track lookup function provided\n");
     struct customTrack *ct = (*ctLookupName)(table);
     if (ct != NULL)
         tdb = ct->tdb;
     }
 else
     {
     char *track = hGetTrackForTable(db, table);
     if (track == NULL)
         return NULL;
     tdb = tdbFindOrCreate(db,parent,track);