mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
fix: crash when not set layoutname in tagrule
This commit is contained in:
parent
af258584ef
commit
c4440aa6a5
2 changed files with 2 additions and 0 deletions
|
|
@ -2623,6 +2623,7 @@ void reload_config(const Arg *arg) {
|
|||
!rule_monitor_name) {
|
||||
for (jk = 0; jk < LENGTH(layouts); jk++) {
|
||||
if (config.tag_rules_count > 0 &&
|
||||
config.tag_rules[i - 1].layout_name &&
|
||||
strcmp(layouts[jk].name,
|
||||
config.tag_rules[i - 1].layout_name) == 0) {
|
||||
m->pertag->ltidxs[config.tag_rules[i - 1].id] =
|
||||
|
|
|
|||
|
|
@ -2508,6 +2508,7 @@ void createmon(struct wl_listener *listener, void *data) {
|
|||
for (i = 1; i <= config.tag_rules_count; i++) {
|
||||
for (jk = 0; jk < LENGTH(layouts); jk++) {
|
||||
if (config.tag_rules_count > 0 &&
|
||||
config.tag_rules[i - 1].layout_name &&
|
||||
strcmp(layouts[jk].name, config.tag_rules[i - 1].layout_name) ==
|
||||
0) {
|
||||
m->pertag->ltidxs[config.tag_rules[i - 1].id] = &layouts[jk];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue