92a112694189040ba6a48e4654b3eae420e09537 kent Mon Jun 2 10:26:21 2014 -0700 Looking for NULL as well as 'null' diff --git src/hg/lib/hgExp.c src/hg/lib/hgExp.c index 712d21a..863463c 100644 --- src/hg/lib/hgExp.c +++ src/hg/lib/hgExp.c @@ -134,31 +134,31 @@ } boolean hgExpLoadVals(struct sqlConnection *lookupConn, struct sqlConnection *dataConn, char *lookupTable, char *name, char *dataTable, int *retValCount, float **retVals) /* Load up and return expression bed record. Return NULL * if none of given name exist. */ { char query[256]; char expName[64]; struct sqlResult *sr; char **row; boolean ok = FALSE; -if (!sameWord(lookupTable, "null")) +if (lookupTable != NULL && !sameWord(lookupTable, "null")) { sqlSafef(query, sizeof(query), "select value from %s where name = '%s'", lookupTable, name); if (sqlQuickQuery(lookupConn, query, expName, sizeof(expName)) == NULL) return FALSE; sqlSafef(query, sizeof(query), "select expScores from %s where name = '%s'", dataTable, expName); } else sqlSafef(query, sizeof(query), "select expScores from %s where name = '%s'", dataTable, name); sr = sqlGetResult(dataConn, query); if ((row = sqlNextRow(sr)) != NULL) { sqlFloatDynamicArray(row[0], retVals, retValCount);