diff --git a/modules/global-db/dap_chain_global_db_hist.c b/modules/global-db/dap_chain_global_db_hist.c
index 2711c371ced74f95f0c554c1d70ef86420cfd046..c2683b156035b3ac7eab75ef6fed3f7d9cf45301 100644
--- a/modules/global-db/dap_chain_global_db_hist.c
+++ b/modules/global-db/dap_chain_global_db_hist.c
@@ -1255,7 +1255,7 @@ static void *s_list_thread_proc(void *arg)
             while(l_dap_db_log_list->group_cur < l_dap_db_log_list->group_number) {
                 l_dap_db_log_list->group_cur++;
                 // check for empty group
-                if(l_dap_db_log_list->group_number_items[l_dap_db_log_list->group_cur] < 1) {
+                if( !(l_dap_db_log_list->group_number) || (l_dap_db_log_list->group_number_items[l_dap_db_log_list->group_cur] < 1)) {
                     continue;
                 }
                 break;