SML: Fix compile error when median-filter is disabled (#21495)

Co-authored-by: Roland Praml <roland@DESKTOP-MKLGCJR>
This commit is contained in:
Roland Praml 2024-05-27 13:11:54 +02:00 committed by GitHub
parent e56f6a150d
commit e07b0e42b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -3633,7 +3633,11 @@ next_line:
sml_globs.sml_mf = (struct SML_MEDIAN_FILTER*)calloc(sml_globs.maxvars, sizeof(struct SML_MEDIAN_FILTER)); sml_globs.sml_mf = (struct SML_MEDIAN_FILTER*)calloc(sml_globs.maxvars, sizeof(struct SML_MEDIAN_FILTER));
#endif #endif
if (!sml_globs.maxvars || !sml_globs.meter_vars || !sml_globs.dvalid || !sml_globs.sml_mf) { if (!sml_globs.maxvars || !sml_globs.meter_vars || !sml_globs.dvalid
#ifdef USE_SML_MEDIAN_FILTER
|| !sml_globs.sml_mf
#endif
) {
AddLog(LOG_LEVEL_INFO, PSTR("sml memory error!")); AddLog(LOG_LEVEL_INFO, PSTR("sml memory error!"));
return; return;
} }