917d0c72f6f08059298f1c95f9dc8e5e9cf1cbe3
larrym
  Thu Nov 3 14:11:17 2011 -0700
fix an undeclared variable error
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 8918fe2..0ad58e3 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -2656,32 +2656,32 @@
                     imageV2.afterReload();
                 }
             } else {
                 warn("ASSERT: Attempt to update track without advanced javascript features.");
             }
             // now pull out and parse the map.
             //a = /<MAP id='map' Name=map>([\s\S]+)<\/MAP>/.exec(response);
             //if(!a[1])
             //    showWarning("Couldn't parse out map");
         }
         // Parse out new ideoGram url (if available)
         // e.g.: <IMG SRC = "../trash/hgtIdeo/hgtIdeo_hgwdev_larrym_61d1_8b4a80.gif" BORDER=1 WIDTH=1039 HEIGHT=21 USEMAP=#ideoMap id='chrom'>
         // We do this last b/c it's least important.
         var a = /<IMG([^>]+SRC[^>]+id='chrom'[^>]*)>/.exec(response);
         if(a && a[1]) {
-            b = /SRC\s*=\s*"([^")]+)"/.exec(a[1]);
-            if(b[1]) {
+            var b = /SRC\s*=\s*"([^")]+)"/.exec(a[1]);
+            if(b && b[1]) {
                 $('#chrom').attr('src', b[1]);
             }
         }
         if(hgTracks.measureTiming) {
             imageV2.updateTiming(response);
         }
         if(this.disabledEle) {
             this.disabledEle.attr('disabled', '');
         }
         if(this.loadingId) {
             hideLoadingImage(this.loadingId);
         }
         jQuery('body').css('cursor', '');
         if(this.currentId) {
             var top = $(document.getElementById("tr_" + this.currentId)).position().top;