From 595de51b0f44e283734b08ed785c75ba879983da Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Mon, 8 Oct 2018 13:31:31 +0200 Subject: [PATCH 1/1] ...and one more forgotten NULL check. --- src/passwordstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passwordstore.c b/src/passwordstore.c index cd56c1b0a..0564d473b 100644 --- a/src/passwordstore.c +++ b/src/passwordstore.c @@ -369,7 +369,7 @@ static gint _write_to_file(FILE *fp) continue; /* Just in case. */ /* Do not save empty blocks. */ - if (g_hash_table_size(block->entries) == 0) + if (block->entries == NULL || g_hash_table_size(block->entries) == 0) continue; /* Prepare the section header string and write it out. */ -- 2.25.1