a6770479059c1d3ed0a77f69ceac2ae19981e89f galt Thu Sep 26 18:29:31 2024 -0700 Since hubs like Tair10 call these functions with a NULL conn, just needed to add a check for that in hgTables identifiers getXrefInfo function. fixes #34495 diff --git src/hg/hgTables/identifiers.c src/hg/hgTables/identifiers.c index 7525818..21b58c9 100644 --- src/hg/hgTables/identifiers.c +++ src/hg/hgTables/identifiers.c @@ -43,31 +43,32 @@ tdb = curTrack; char *xrefSpec = tdb ? trackDbSettingClosestToHomeOrDefault(tdb, "idXref",NULL) : NULL; char *xrefTable = NULL, *idField = NULL, *aliasField = NULL; if (xrefSpec != NULL) { char *words[3]; chopLine(cloneString(xrefSpec), words); if (isEmpty(words[2])) errAbort("trackDb error: track %s, setting idXref must be followed " "by three words (xrefTable, idField, aliasField).", curTrack->track); xrefTable = words[0]; idField = words[1]; aliasField = words[2]; - if (!sqlTableExists(conn, xrefTable) || + + if (!conn || !sqlTableExists(conn, xrefTable) || sqlFieldIndex(conn, xrefTable, idField) < 0 || sqlFieldIndex(conn, xrefTable, aliasField) < 0) xrefTable = idField = aliasField = NULL; } if (retXrefTable != NULL) *retXrefTable = xrefTable; if (retIdField != NULL) *retIdField = idField; if (retAliasField != NULL) *retAliasField = aliasField; } static struct slName *getExamples(char *db, struct sqlConnection *conn, char *table, char *field, int count) /* Return a list of several example values of table.field. */