src/hg/lib/trackDbCustom.c 1.62
1.62 2009/04/14 14:22:26 angie
In tdbFindOrCreate, call hMaybeTrackInfo instead of hTrackDbForTrack so if db is non-genome, we don't get an errAbort due to the lack of trackDb table. NULL was already an OK return value from this.
Index: src/hg/lib/trackDbCustom.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/trackDbCustom.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -b -B -U 4 -r1.61 -r1.62
--- src/hg/lib/trackDbCustom.c 10 Apr 2009 19:56:35 -0000 1.61
+++ src/hg/lib/trackDbCustom.c 14 Apr 2009 14:22:26 -0000 1.62
@@ -806,7 +806,11 @@
else
tdb = subTdbFind(parent,table);
}
if(tdb == NULL && db != NULL)
- tdb = hTrackDbForTrack(db, table);
+ {
+ struct sqlConnection *conn = hAllocConn(db);
+ tdb = hMaybeTrackInfo(conn, table);
+ hFreeConn(&conn);
+ }
return tdb;
}