From f539c3b198201f8f33f02b2ff0b595b205e5364c Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Fri, 23 Sep 2022 17:14:44 +0200 Subject: [PATCH] Ensures no leakage of glyph_matrix ; * src/dispnew.c (allocate_matrices_for_window_redisplay): Ensures no leakage of glyph_matrix. --- src/dispnew.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index b786f0f1ba..5659b3d4fc 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1808,10 +1808,10 @@ allocate_matrices_for_window_redisplay (struct window *w) /* If matrices are not yet allocated, allocate them now. */ if (w->desired_matrix == NULL) - { - w->desired_matrix = new_glyph_matrix (NULL); - w->current_matrix = new_glyph_matrix (NULL); - } + w->desired_matrix = new_glyph_matrix (NULL); + + if (w->current_matrix == NULL) + w->current_matrix = new_glyph_matrix (NULL); dim.width = required_matrix_width (w); dim.height = required_matrix_height (w); -- 2.37.3