7c8f5b85d9f0416d28e7c05e9789022ce046d7fb
hiram
  Sat Feb 4 14:46:47 2012 -0800
hTableExists fails when the db does not exist, eliminate dependency on hgFixed existing for cutters data from hgFixed and trackVersion table in hgFixed
diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 266cc04..942d4ca 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -3454,31 +3454,31 @@
 	    }
         errCatchEnd(errCatch);
         if (errCatch->gotError)
 	    hubUpdateStatus( errCatch->message->string, hub);
 	else
 	    hubUpdateStatus(NULL, hub);
         errCatchFree(&errCatch);
 	}
     }
 hubConnectStatusFreeList(&hubList);
 }
 
 boolean restrictionEnzymesOk()
 /* Check to see if it's OK to do restriction enzymes. */
 {
-return (hTableExists("hgFixed", "cutters") &&
+return (hDbExists("hgFixed") && hTableExists("hgFixed", "cutters") &&
     hTableExists("hgFixed", "rebaseRefs") &&
     hTableExists("hgFixed", "rebaseCompanies"));
 }
 
 static void fr2ScaffoldEnsemblLink(char *archive, struct hotLink **links)
 /* print out Ensembl link to appropriate scaffold there */
 {
 struct sqlConnection *conn = hAllocConn(database);
 struct sqlResult *sr = NULL;
 char **row = NULL;
 char query[256];
 safef(query, sizeof(query),
 "select * from chrUn_gold where chrom = '%s' and chromStart<%u and chromEnd>%u",
 chromName, winEnd, winStart);
 sr = sqlGetResult(conn, query);