aboutsummaryrefslogtreecommitdiff
path: root/sway/border.c
diff options
context:
space:
mode:
authorDrew DeVault <ddevault@linode.com>2016-03-30 09:21:30 -0400
committerDrew DeVault <ddevault@linode.com>2016-03-30 09:21:30 -0400
commitebead7a9bf79c9571647f8b7fba7c3439c06734f (patch)
tree332c8092d9bb23393b74c57365d4ffcacbec04c1 /sway/border.c
parenta4bf09f1426fff7b058cfdd1f037859fb1006c26 (diff)
Fix crashes with borders
Diffstat (limited to 'sway/border.c')
-rw-r--r--sway/border.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/border.c b/sway/border.c
index ab4b70f6..fa54ebe2 100644
--- a/sway/border.c
+++ b/sway/border.c
@@ -253,10 +253,12 @@ void render_view_borders(wlc_handle view) {
// update window title
const char *new_name = wlc_view_get_title(view);
- if (new_name && strcmp(c->name, new_name) != 0) {
- free(c->name);
- c->name = strdup(new_name);
- update_view_border(c);
+ if (new_name) {
+ if (!c->name || strcmp(c->name, new_name) != 0) {
+ free(c->name);
+ c->name = strdup(new_name);
+ update_view_border(c);
+ }
}
}