From 0fd9f890c512dcd877c4e421340f21bea1966557 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 16 Sep 2017 15:40:18 -0400 Subject: [PATCH] Corrected error attempting to free the backing store memory twice during a window close event (Cairo graphics interface only). --- graphics/grTCairo1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/graphics/grTCairo1.c b/graphics/grTCairo1.c index 6e6068f5..c582914e 100644 --- a/graphics/grTCairo1.c +++ b/graphics/grTCairo1.c @@ -1144,11 +1144,9 @@ MagWindow *w; entry = HashLookOnly(&grTCairoWindowTable, (char *)xw); HashSetValue(entry, NULL); + grtcairoFreeBackingStore(w); + tcairodata = (TCairoData *)w->w_grdata2; - if (tcairodata->backing_surface != NULL) - cairo_surface_destroy(tcairodata->backing_surface); - if (tcairodata->backing_context != NULL) - cairo_destroy(tcairodata->backing_context); if (tcairodata->surface != NULL) cairo_surface_destroy(tcairodata->surface); if (tcairodata->context != NULL)