aa16e99d2e8103e45c0d737ce7578c0837fe5af8
braney
  Thu Oct 3 16:33:04 2013 -0700
fix a crash in snake drawing code when there are no blocks in a speciesin pack mode.

diff --git src/hg/hgTracks/snakeTrack.c src/hg/hgTracks/snakeTrack.c
index 22ab830..f7c838c 100644
--- src/hg/hgTracks/snakeTrack.c
+++ src/hg/hgTracks/snakeTrack.c
@@ -1064,34 +1064,34 @@
 	sf->qStart = cur->qStart;
 	sf->qEnd = cur->qStart + cur->size;
 	sf->orientation = (cur->strand == '+') ? 1 : -1;
 	sf->sequence = cloneString(cur->sequence);
 	sf->qName = cur->qChrom;
 
 	cur = cur->next;
     }
     if (tg->visibility == tvFull)
 	{
 	for(lf=lfList; lf ; lf = lf->next)
 	    {
 	    slSort(&lf->components, snakeFeatureCmpQStart);
 	    }
 	}
-    else if (tg->visibility == tvPack)
+    else if ((tg->visibility == tvPack) && (lfList != NULL))
 	{
-	assert(lf->next == NULL);
-	slSort(&lf->components, snakeFeatureCmpTStart);
+	assert(lfList->next == NULL);
+	slSort(&lfList->components, snakeFeatureCmpTStart);
 	}
     
     //halFreeBlocks(head);
     //halClose(handle, myThread);
 
     tg->items = lfList;
     }
 errCatchEnd(errCatch);
 if (errCatch->gotError)
     {
     tg->networkErrMsg = cloneString(errCatch->message->string);
     tg->drawItems = bigDrawWarning;
     tg->totalHeight = bigWarnTotalHeight;
     }
 errCatchFree(&errCatch);