From ed4c1a10463b1a6a6777b5685d4bab4a0f5d5068 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 28 Nov 2012 18:22:20 +0000 Subject: Bug 693452: Memory leak with transitions disabled. Since adding transition support any page turn has leaked a bitmap image. Don't save the old image unless we are really in transition mode. --- apps/pdfapp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 9760385b..24668af7 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -595,6 +595,9 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai if (!app->nowaitcursor) wincursor(app, WAIT); + if (!app->transitions_enabled || !app->presentation_mode) + transition = 0; + if (transition) { app->old_image = app->image; @@ -668,7 +671,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai fz_invert_pixmap(app->ctx, app->image); } - if (transition && app->transitions_enabled && app->presentation_mode) + if (transition) { fz_transition *new_trans; app->new_image = app->image; -- cgit v1.2.3