fix crash bug when editing single text

This commit is contained in:
2025-02-16 15:35:57 -06:00
parent c4e1ff7f0d
commit 8b873ffea5

View File

@@ -1041,7 +1041,8 @@ static bool edit_spec_text_event_filter(cDialog& me, std::string item_hit, eStrM
}
fetch_str(str_mode, *str1) = str;
}
str = me["str2"].getText();
str = "";
if(me.hasControl("str2")) str = me["str2"].getText();
if(str2 != nullptr && !str.empty()) {
if(*str2 < 0) {
size_t n = num_strs(str_mode);