From 35d4f4a855f85e6807a670aa09083e204c95c205 Mon Sep 17 00:00:00 2001 From: Dmitriy Gerasimov <naeper@demlabs.net> Date: Wed, 22 May 2019 23:26:24 +0700 Subject: [PATCH] [*] Added check for key is null or not --- dap_chain_global_db_hist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dap_chain_global_db_hist.c b/dap_chain_global_db_hist.c index 56e80bb..d9490e8 100755 --- a/dap_chain_global_db_hist.c +++ b/dap_chain_global_db_hist.c @@ -159,7 +159,7 @@ time_t dap_db_log_get_last_timestamp(void) } //printf("l_obj_cur->key=%s\n", l_obj_cur->key); } - time_t l_ret_time = strtoll(last_key, NULL, 10); + time_t l_ret_time = last_key? strtoll(last_key, NULL, 10): 0; dap_chain_global_db_objs_delete(l_objs); return l_ret_time; } -- GitLab