mirror of
https://github.com/swaywm/sway
synced 2024-11-19 07:34:28 +01:00
Fix crashes with borders
This commit is contained in:
parent
a4bf09f142
commit
ebead7a9bf
@ -253,10 +253,12 @@ void render_view_borders(wlc_handle view) {
|
|||||||
// update window title
|
// update window title
|
||||||
const char *new_name = wlc_view_get_title(view);
|
const char *new_name = wlc_view_get_title(view);
|
||||||
|
|
||||||
if (new_name && strcmp(c->name, new_name) != 0) {
|
if (new_name) {
|
||||||
free(c->name);
|
if (!c->name || strcmp(c->name, new_name) != 0) {
|
||||||
c->name = strdup(new_name);
|
free(c->name);
|
||||||
update_view_border(c);
|
c->name = strdup(new_name);
|
||||||
|
update_view_border(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user