diff --git a/src/section_list_loader.c b/src/section_list_loader.c index 2d2d69ba..44afd6ed 100644 --- a/src/section_list_loader.c +++ b/src/section_list_loader.c @@ -151,7 +151,7 @@ int load_section_config_from_db(int update_gen_ex) p_section->enable = (int8_t)atoi(row[6]); // Update gen_ex menu set - if (update_gen_ex && p_section->enable && atoi(row[7]) > p_section->ex_menu_tm) + if (update_gen_ex && p_section->enable && atol(row[7] == NULL ? "0" : row[7]) > p_section->ex_menu_tm) { snprintf(ex_menu_conf, sizeof(ex_menu_conf), "%s/%d", VAR_GEN_EX_MENU_DIR, p_section->sid); @@ -177,6 +177,10 @@ int load_section_config_from_db(int update_gen_ex) #endif } } + else + { + p_section->ex_menu_tm = 0; + } // release rw lock ret = section_list_rw_unlock(p_section);