fix: avoid use null mon when session not active

This commit is contained in:
DreamMaoMao
2026-01-01 14:48:49 +08:00
parent ed557fa5aa
commit 23d550e04d
3 changed files with 7 additions and 2 deletions

View File

@@ -1,6 +1,10 @@
void set_size_per(Monitor *m, Client *c) {
Client *fc = NULL;
bool found = false;
if (!m || !c)
return;
wl_list_for_each(fc, &clients, link) {
if (VISIBLEON(fc, m) && ISTILED(fc) && fc != c) {
c->master_mfact_per = fc->master_mfact_per;