diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-11-28 18:22:20 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-11-28 18:29:10 +0000 |
commit | ed4c1a10463b1a6a6777b5685d4bab4a0f5d5068 (patch) | |
tree | b3ee6abfad93a8139c7dbb79ef6b5cc9d0d3d3cc /apps | |
parent | 4344ce6ba5037eb4d1ac22bd7ebf87707864fb25 (diff) | |
download | mupdf-ed4c1a10463b1a6a6777b5685d4bab4a0f5d5068.tar.xz |
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.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |