FIX: OptionsSearcher::get_option crash for z_hop_types

Change-Id: I84d234628335505e44e984dc1dddff4822d44346
Jira: STUDIO-10886
This commit is contained in:
chunmao.guo 2025-03-17 13:41:29 +08:00 committed by lane.wei
parent f1365df997
commit 852c580569
1 changed files with 2 additions and 2 deletions

View File

@ -332,9 +332,9 @@ const Option &OptionsSearcher::get_option(const std::string &opt_key, Preset::Ty
variant_index = -1;
} else if (it->opt_key() != opt_key) {
auto it2 = it;
while (it2 != options.end() && it2->opt_key() != opt_key && it2->opt_key().compare(0, opt_key2.length(), opt_key2) == 0)
while (it2 != options.end() && it2->opt_key() != opt_key && it2->opt_key().compare(0, opt_key2.length(), opt_key2) != 0)
++it2;
if (it2->opt_key() == opt_key)
if (it2 != options.end() && it2->opt_key() == opt_key)
it = it2;
if (it2 == it)
variant_index = -2;