diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-15 14:35:54 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-17 08:29:14 +1000 |
commit | b351d0a64a9d545cdfe1fe1821858cbda1f5fa4e (patch) | |
tree | 3408b89a08a3786bab38140344fc78c74b2f17cc | |
parent | Don't show marks which start with an underscore (diff) | |
download | sway-b351d0a64a9d545cdfe1fe1821858cbda1f5fa4e.tar.gz sway-b351d0a64a9d545cdfe1fe1821858cbda1f5fa4e.tar.zst sway-b351d0a64a9d545cdfe1fe1821858cbda1f5fa4e.zip |
Set textures to null when destroying
-rw-r--r-- | sway/tree/container.c | 1 | ||||
-rw-r--r-- | sway/tree/view.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index a17b20f7..47ba88a9 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -592,6 +592,7 @@ static void update_title_texture(struct sway_container *con, | |||
592 | } | 592 | } |
593 | if (*texture) { | 593 | if (*texture) { |
594 | wlr_texture_destroy(*texture); | 594 | wlr_texture_destroy(*texture); |
595 | *texture = NULL; | ||
595 | } | 596 | } |
596 | if (!con->formatted_title) { | 597 | if (!con->formatted_title) { |
597 | return; | 598 | return; |
diff --git a/sway/tree/view.c b/sway/tree/view.c index 8db5c9d5..aaca8753 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -779,6 +779,7 @@ static void update_marks_texture(struct sway_view *view, | |||
779 | } | 779 | } |
780 | if (*texture) { | 780 | if (*texture) { |
781 | wlr_texture_destroy(*texture); | 781 | wlr_texture_destroy(*texture); |
782 | *texture = NULL; | ||
782 | } | 783 | } |
783 | if (!view->marks->length) { | 784 | if (!view->marks->length) { |
784 | return; | 785 | return; |