5acf60bce199d70fa2c18f36d45233e5ee67edee
kate
  Tue Jan 28 11:38:35 2014 -0800
Fix error check -- allow motif display without DNA sequence (as in dm2 flyReg track)
diff --git src/hg/hgc/regMotif.c src/hg/hgc/regMotif.c
index 3abecbd..3b43161 100644
--- src/hg/hgc/regMotif.c
+++ src/hg/hgc/regMotif.c
@@ -96,31 +96,31 @@
 char query[256];
 struct dnaMotif *motif;
 sqlSafefFrag(query, sizeof query, "name = '%s'", motifName);
 motif = dnaMotifLoadWhere(conn, motifTable, query);
 hFreeConn(&conn);
 return motif;
 }
 
 
 void motifMultipleHitsSection(struct dnaSeq **seqs, int count, struct dnaMotif *motif)
 /* Print out section about motif, possibly with mutliple occurrences. */
 {
 // Detect inconsistent motif/pwm tables and suppress confusing display
 if (motif != NULL)
     {
-    if (motif->columnCount != seqs[0]->size)
+    if (seqs != NULL && motif->columnCount != seqs[0]->size)
         {
         warn("Motif seq length doesn't match PWM\n");
         return;
         }
     }
 
 #define MOTIF_HELP_PAGE "../goldenPath/help/hgRegMotifHelp.html"
 webNewSection("Motif Sequence from Matching Strand");
 printf("<PRE>\n");
 printf("<table>\n");
 if (motif != NULL)
     {
     struct tempName pngTn;
     dnaMotifMakeProbabalistic(motif);
     makeTempName(&pngTn, "logo", ".png");