diff --git a/modules/type/dag/dap_chain_cs_dag.c b/modules/type/dag/dap_chain_cs_dag.c index f733455e0a39d7051b7a3c378839729b483e12cd..1d591700c7de68dbc8c0024c5a5ac793ebf341e3 100644 --- a/modules/type/dag/dap_chain_cs_dag.c +++ b/modules/type/dag/dap_chain_cs_dag.c @@ -279,7 +279,7 @@ int dap_chain_cs_dag_new(dap_chain_t * a_chain, dap_config_t * a_chain_cfg) dap_chain_global_db_add_sync_extra_group(l_net->pub.name, l_dag->gdb_group_events_round_new, s_history_callback_round_notify, l_dag); l_dag->broadcast_disable = false; byte_t *l_current_round = dap_global_db_get_sync(l_gdb_group, DAG_ROUND_CURRENT_KEY, NULL, NULL, NULL); - l_dag->round_current = *(uint64_t *)l_current_round; + l_dag->round_current = l_current_round? *(uint64_t *)l_current_round : 0; DAP_DELETE(l_current_round); if ( l_dag->is_single_line ) { log_it (L_NOTICE, "DAG chain initialized (single line)");