Navigation Menu

Skip to content

Commit

Permalink
WT-2162. Add a null pointer check for the WT_TABLE.indices array.
Browse files Browse the repository at this point in the history
This array may be partially populated after an index is dropped.
  • Loading branch information
ddanderson committed Oct 8, 2015
1 parent 5c0cc81 commit d746adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema/schema_open.c
Expand Up @@ -571,7 +571,7 @@ __wt_schema_get_index(WT_SESSION_IMPL *session,
/* Try to find the index in the table. */
for (i = 0; i < table->nindices; i++) {
idx = table->indices[i];
if (strcmp(idx->name, uri) == 0) {
if (idx != NULL && strcmp(idx->name, uri) == 0) {
if (tablep != NULL)
*tablep = table;
else
Expand Down

0 comments on commit d746adb

Please sign in to comment.