src/hg/hgTables/schema.c 1.58
1.58 2009/04/03 19:08:34 angie
curTrack is NULL when group is All Tables -- in that case, call hAllocConn instead of hAllocConnTrack in showSchemaDb.
Index: src/hg/hgTables/schema.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/schema.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -b -B -U 4 -r1.57 -r1.58
--- src/hg/hgTables/schema.c 1 Apr 2009 23:59:44 -0000 1.57
+++ src/hg/hgTables/schema.c 3 Apr 2009 19:08:34 -0000 1.58
@@ -334,9 +334,14 @@
static void showSchemaDb(char *db, struct trackDb *tdb, char *table)
/* Show schema to open html page. */
{
-struct sqlConnection *conn = hAllocConnTrack(db, tdb ? tdb : curTrack);
+struct trackDb *tdbForConn = tdb ? tdb : curTrack;
+struct sqlConnection *conn;
+if (tdbForConn == NULL)
+ conn = hAllocConn(db);
+else
+ conn = hAllocConnTrack(db, tdbForConn);
struct joiner *joiner = allJoiner;
struct joinerPair *jpList, *jp;
struct asObject *asObj = asForTable(conn, table);
char *splitTable = chromTable(conn, table);