80f348023d2e4c4a7fd37c5d7999b712e11f9e94
galt
  Thu Oct 14 16:54:46 2021 -0700
Fixing barChartTrack with little tweak to wait until extras has been initialized, the track heights methods would ideally never be called BEFORE trackLoading is complete. refs #28291

diff --git src/hg/hgTracks/barChartTrack.c src/hg/hgTracks/barChartTrack.c
index 85bcd5e..2bb8333 100644
--- src/hg/hgTracks/barChartTrack.c
+++ src/hg/hgTracks/barChartTrack.c
@@ -838,33 +838,36 @@
 /* Figure out total height of track. Set in track and also return it */
 {
 int height = 0;
 int lineHeight = 0;
 int heightPer = 0;
 
 if (vis == tvDense)
     {
     heightPer = tl.fontHeight;
     lineHeight=heightPer+1;
     }
 else if (vis == tvSquish)
     {
     // for visibility, set larger than the usual squish, which is half font height
     struct barChartTrack *extras = (struct barChartTrack *)tg->extraUiData;
+    if (extras)  // has it been initialized yet?
+	{
 	heightPer = extras->squishHeight * 2;  // the squish packer halves this
 	lineHeight=heightPer+1;
 	}
+    }
 else if ((vis == tvPack) || (vis == tvFull))
     {
     heightPer = tl.fontHeight;
     lineHeight=heightPer;
     }
 
 height = tgFixedTotalHeightOptionalOverflow(tg, vis, lineHeight, heightPer, FALSE);
 
 if ((vis == tvPack) || (vis == tvFull))
     {
     // set variable height rows
 
     if (tg->ss)  // got past trackLoadingInProgress
 	{
 	struct spaceSaver *ss = findSpaceSaver(tg, vis); // ss is a list now