db5f5f11ab2d4b7c9b13ad9a415a642cbe77c311
braney
  Wed Sep 4 14:20:19 2013 -0700
don't crash in Human Proteins detail page if proteome.uniProtAliasdoesn't exist fixes #11653

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 287edf7..5ce66e1 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -20388,31 +20388,31 @@
 if (acc != NULL)
     {
     if (isDm== TRUE)
 	printf("<B>FlyBase Entry:</B> <A HREF=\" %s%s", tdb->url, acc);
     else if (isSacCer== TRUE)
 	printf("<B>SGD Entry:</B> <A HREF=\" %s%s", tdb->url, acc);
     else if (isCe == TRUE)
 	printf("<B>Wormbase ORF Name:</B> <A HREF=\" %s%s", tdb->url, acc);
     else
 	{
 	printf("<B>Human mRNA:</B> <A HREF=\"");
 	printEntrezNucleotideUrl(stdout, acc);
 	}
     printf("\" TARGET=_blank>%s</A><BR>\n", acc);
     }
-if (!isDm && (prot != NULL) && !sameString("(null)", prot))
+if (!isDm && (prot != NULL) && !sameString("(null)", prot) && sqlTableExists(conn,"proteome.uniProtAlias"))
     {
     printf("<B>UniProtKB:</B> ");
     printf("<A HREF=");
     printSwissProtProteinUrl(stdout, prot);
 
     spAcc = uniProtFindPrimAcc(prot);
     if (spAcc == NULL)
         {
 	printf(" TARGET=_blank>%s</A></B><BR>\n", prot);
         }
     else
         {
 	printf(" TARGET=_blank>%s</A></B><BR>\n", spAcc);
         }
     }