25d71da8cf5aa20351e797594d56ccea1fc3c2bd
braney
  Fri Feb 10 14:17:34 2023 -0800
fix bug where "logo" type wiggle crased if it had a parent with no
"container" attribute

diff --git src/hg/hgTracks/wigTrack.c src/hg/hgTracks/wigTrack.c
index 6d2d770..fc09a69 100644
--- src/hg/hgTracks/wigTrack.c
+++ src/hg/hgTracks/wigTrack.c
@@ -1266,31 +1266,32 @@
                     if (numTrack > 0)
                         {
                         y0 = (graphUpperLimit  - yOffsets[(numTrack-1) *  width + x1]) *scaleFactor;
                         y1 = (graphUpperLimit - dataValue - yOffsets[(numTrack-1) *  width + x1])*scaleFactor;
                         }
                     }
 
                 int boxHeight = max(1,abs(y1 - y0));
                 int boxTop = min(y1,y0);
 
                 //	positive data value exactly equal to Bottom pixel
                 //  make sure it draws at least a pixel there
                 if (boxTop == h)
                     boxTop = h - 1;
 
-                if (tg->tdb->parent && startsWith("multiWig", trackDbSetting(tg->tdb->parent,"container")))
+                char *setting;
+                if (tg->tdb->parent && ((setting = trackDbSetting(tg->tdb->parent,"container")) != NULL) && startsWith("multiWig", setting))
                     {
                     switch(numTrack)
                         {
                         case 3: if (baseCmpl) base='t'; else base='a';break;
                         case 2: if (baseCmpl) base='g'; else base='c';break;
                         case 1: if (baseCmpl) base='c'; else base='g';break;
                         case 0: if (baseCmpl) base='a'; else base='t';break;
                         }
                     }
                 char string[2];
                 string[0] = toupper(base);
                 string[1] = 0;
                 MgFont *font = tl.font;
                 int height = dataValue * scaleFactor;
                 unsigned color = MG_BLACK;