69e65f45d0db6e87a72aa22c5aa61c3c4f6f2412
braney
  Mon Jul 18 14:33:48 2016 -0700
fix up some problems in table browser with CRAM output #17698

diff --git src/hg/hgTables/bigWig.c src/hg/hgTables/bigWig.c
index 1dbc781..9a70eb8 100644
--- src/hg/hgTables/bigWig.c
+++ src/hg/hgTables/bigWig.c
@@ -33,35 +33,36 @@
 else
     return trackIsType(database, table, curTrack, "bigWig", ctLookupName);
 }
 
 char *bigFileNameFromCtOrHub(char *table, struct sqlConnection *conn)
 /* If table is a custom track or hub track, return the bigDataUrl setting;
  * otherwise return NULL.  Do a freeMem on returned string when done. */
 {
 char *fileName = NULL;
 if (isCustomTrack(table))
     {
     struct customTrack *ct = ctLookupName(table);
     if (ct != NULL)
         fileName = cloneString(trackDbSetting(ct->tdb, "bigDataUrl"));
     }
-else if (isHubTrack(table))
+else
     {
     struct trackDb *tdb = hashFindVal(fullTableToTdbHash, table);
     assert(tdb != NULL);
     fileName = cloneString(trackDbSetting(tdb, "bigDataUrl"));
+    if (isHubTrack(table))   // if it's a native track, we'll assume it has a table with the name
         assert(fileName != NULL);
     }
 return fileName;
 }
 
 char *bigWigFileName(char *table, struct sqlConnection *conn)
 /* Return file name associated with bigWig.  This handles differences whether it's
  * a custom or built-in track.  Do a freeMem on returned string when done. */
 {
 if (isCustomTrack(table) || isHubTrack(table))
    return bigFileNameFromCtOrHub(table, conn);
 struct trackDb *tdb = hashMustFindVal(fullTableToTdbHash, table);
 return tdbBigFileName(conn, tdb);
 }