34640b8bb26a2f43097ff65d9b2555a79b8335f5
kate
  Thu Feb 7 11:59:13 2019 -0800
Fix display problem with interchromosomal items in non-full modes (introduced with new pack/dense/cluster display code for Genehancer). refs #22910

diff --git src/hg/hgTracks/interactTrack.c src/hg/hgTracks/interactTrack.c
index 9bd7e92..7b4691a 100644
--- src/hg/hgTracks/interactTrack.c
+++ src/hg/hgTracks/interactTrack.c
@@ -830,31 +830,31 @@
     {
     struct simpleFeature *sf;
     int shortHeight = tg->heightPer/2;
     for (sf = lf->components;  sf; sf = sf->next)
         {
         if (sf->start > lf->tallStart && sf->end < lf->tallEnd)
             {
             drawScaledBox(hvg, sf->start, sf->end, scale, xOff, y + shortHeight/2,
                                 shortHeight, MG_WHITE);
             }
         }
     }
 else
     {
     struct simpleFeature *sf1 = lf->components, *sf2 = sf1->next;
-    if (sf2->start > lf->tallStart && sf2->end < lf->tallEnd)
+    if (sf2 && sf2->start > lf->tallStart && sf2->end < lf->tallEnd)
         drawScaledBox(hvg, sf2->start, sf2->end, scale, xOff, y, tg->heightPer, MG_WHITE);
     if (vis == tvPack || vis == tvFull)
         {
         // add right label
         int x2 = round((double)((int)lf->end - winStart) * scale) + xOff;
         int x = x2 + tl.mWidth/2;
         struct interactLfEndNames *ends = getInteractLfEndNames(lf);
         char *rightLabel = (lf->orientation < 0 ? ends->source : ends->target);
         int w = mgFontStringWidth(font, rightLabel);
         hvGfxTextCentered(hvg, x, y, w, tg->heightPer, color, font, rightLabel);
         }
     }
 }
 
 void interactDrawItems(struct track *tg, int seqStart, int seqEnd,