mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1406 from Spiffyk/language-segfault
sway/language: fix segmentation fault for layouts not found in XKBContext
This commit is contained in:
commit
96caa9f094
@ -154,7 +154,10 @@ auto Language::init_layouts_map(const std::vector<std::string>& used_layouts) ->
|
||||
|
||||
std::map<std::string, int> short_name_to_number_map;
|
||||
for (const auto& used_layout_name : used_layouts) {
|
||||
auto used_layout = &layouts_map_.find(used_layout_name)->second;
|
||||
auto found = layouts_map_.find(used_layout_name);
|
||||
if (found == layouts_map_.end())
|
||||
continue;
|
||||
auto used_layout = &found->second;
|
||||
auto layouts_with_same_name_list = found_by_short_names[used_layout->short_name];
|
||||
if (layouts_with_same_name_list.size() < 2) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user