Skip to content

Commit

Permalink
SML: Fix compile error when median-filter is disabled (#21495)
Browse files Browse the repository at this point in the history
Co-authored-by: Roland Praml <roland@DESKTOP-MKLGCJR>
  • Loading branch information
rPraml and Roland Praml authored May 27, 2024
1 parent e56f6a1 commit e07b0e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasmota/tasmota_xsns_sensor/xsns_53_sml.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3633,7 +3633,11 @@ next_line:
sml_globs.sml_mf = (struct SML_MEDIAN_FILTER*)calloc(sml_globs.maxvars, sizeof(struct SML_MEDIAN_FILTER));
#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!"));
return;
}
Expand Down

0 comments on commit e07b0e4

Please sign in to comment.