Navigation Menu

Skip to content

Commit

Permalink
Add missing NULL check
Browse files Browse the repository at this point in the history
grn_db::specs is NULL for temporary database.
  • Loading branch information
kou committed Oct 8, 2015
1 parent 7b52bd2 commit 5a348ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db.c
Expand Up @@ -10281,7 +10281,7 @@ grn_obj_flush(grn_ctx *ctx, grn_obj *obj)
{
grn_db *db = (grn_db *)obj;
rc = grn_obj_flush(ctx, db->keys);
if (rc == GRN_SUCCESS) {
if (rc == GRN_SUCCESS && db->specs) {
rc = grn_obj_flush(ctx, (grn_obj *)(db->specs));
}
}
Expand Down

0 comments on commit 5a348ae

Please sign in to comment.