From 3ebb4a78e47ea74667b7cb7e9614f2b3accdae6d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 28 Oct 2012 18:16:20 +0100 Subject: [PATCH] Fix crash on animation after resizing The animate buffers were still holding pointers to a discarded cairo surface. --- draw.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/draw.c b/draw.c index 99203b9..2d06ec1 100644 --- a/draw.c +++ b/draw.c @@ -772,7 +772,9 @@ DrawBlank (AnimNr anr, int x, int y, int startColor) void CopyRectangle (AnimNr anr, int srcBuf, int destBuf, int srcX, int srcY, int width, int height, int destX, int destY) { - cairo_t *cr = cairo_create (c_animBufs[anr+destBuf]); + cairo_t *cr; + c_animBufs[anr+4] = csBoardWindow; + cr = cairo_create (c_animBufs[anr+destBuf]); cairo_set_source_surface (cr, c_animBufs[anr+srcBuf], destX - srcX, destY - srcY); cairo_rectangle (cr, destX, destY, width, height); cairo_fill (cr); -- 1.7.0.4