diff --git a/hgsane/sane_hg_mdw.cpp b/hgsane/sane_hg_mdw.cpp index 5e0bf4a..8047ed6 100644 --- a/hgsane/sane_hg_mdw.cpp +++ b/hgsane/sane_hg_mdw.cpp @@ -1979,7 +1979,7 @@ SANE_Status hg_sane_middleware::set_option(SANE_Handle h, const void* option, SA { VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "the setting '%s' affects other options value, RELOAD ...\n", desc_title.c_str()); //on_SCANNER_ERR_CONFIGURATION_CHANGED(dev); - if(dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) && dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already + if(dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) == 0 || dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already reload_options(handle); err = (scanner_err)SANE_INFO_RELOAD_OPTIONS; } @@ -1992,7 +1992,7 @@ SANE_Status hg_sane_middleware::set_option(SANE_Handle h, const void* option, SA { VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "the setting '%s' affects image parameter and options, APP should re-get image info and reload options...\n", desc_title.c_str()); //on_SCANNER_ERR_CONFIGURATION_CHANGED(dev); - if (dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) && dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already + if (dev->fixed_id.count(SANE_OPT_ID_LANGUAGE) == 0 || dev->fixed_id[SANE_OPT_ID_LANGUAGE] != id) // language reload by callback already reload_options(handle); err = (scanner_err)(SANE_INFO_RELOAD_PARAMS | SANE_INFO_RELOAD_OPTIONS); }