6f861122e1ce5bb39f15192b2c807e92a5b65e56 braney Wed Sep 3 12:20:45 2014 -0700 fix a crashing bug when the user requests an extraIndex on a field thatdoesn't exist #13928 diff --git src/utils/bedToBigBed/bedToBigBed.c src/utils/bedToBigBed/bedToBigBed.c index dbed407..c8bcd6a 100644 --- src/utils/bedToBigBed/bedToBigBed.c +++ src/utils/bedToBigBed/bedToBigBed.c @@ -488,31 +488,31 @@ /* Allocate arrays according field count. */ AllocArray(eim->indexFields, eim->indexCount); AllocArray(eim->maxFieldSize, eim->indexCount); AllocArray(eim->chunkArrayArray, eim->indexCount); AllocArray(eim->fileOffsets, eim->indexCount); /* Loop through each field checking that it is indeed something we can index * and if so saving information about it */ int indexIx = 0; struct slName *name; for (name = extraIndexList; name != NULL; name = name->next) { struct asColumn *col = asColumnFind(as, name->name); if (col == NULL) errAbort("extraIndex field %s not a standard bed field or found in 'as' file.", - col->name); + name->name); if (!sameString(col->lowType->name, "string")) errAbort("Sorry for now can only index string fields."); eim->indexFields[indexIx] = slIxFromElement(as->columnList, col); ++indexIx; } return eim; } void bbExIndexMakerAllocChunkArrays(struct bbExIndexMaker *eim, int recordCount) /* Allocate the big part of the extra index maker - the part that holds which * chunk is used for each record. */ { eim->recordCount = recordCount; int i; for (i=0; i < eim->indexCount; ++i)