36e24af8e99c9fc7317933d69beb0455f531d268 braney Thu Feb 23 14:02:10 2017 -0800 don't crash on bigMaf's when the summary hasn't been set and the track is dense or in a >1Mb view diff --git src/hg/hgTracks/wigMafTrack.c src/hg/hgTracks/wigMafTrack.c index ae79ef4..1308a98 100644 --- src/hg/hgTracks/wigMafTrack.c +++ src/hg/hgTracks/wigMafTrack.c @@ -971,30 +971,32 @@ } static void drawScoreOverviewBig( struct track *track, int height, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, Color altColor, enum trackVisibility vis) /* Draw density plot or graph for overall maf scores rather than computing * by sections, for speed. Don't actually load the mafs -- just * the scored refs from the table. */ { struct lm *lm = lmInit(0); char *fileName = trackDbSetting(track->tdb, "summary"); +if (fileName == NULL) + return; struct bbiFile *bbi = bigBedFileOpen(fileName); struct bigBedInterval *bb, *bbList = bigBedIntervalQuery(bbi, chromName, seqStart, seqEnd, 0, lm); char *bedRow[7]; char startBuf[16], endBuf[16]; double scale = scaleForPixels(width); for (bb = bbList; bb != NULL; bb = bb->next) { bigBedIntervalToRow(bb, chromName, startBuf, endBuf, bedRow, ArraySize(bedRow)); struct mafSummary *ms; ms = mafSummaryLoad(bedRow); drawScore(ms->score, ms->chromStart, ms->chromEnd, seqStart, scale, hvg, xOff, yOff, height, color, vis); }