Destroy surface if page is not visible

This commit is contained in:
Moritz Lipp 2011-04-19 20:46:33 +02:00
parent 09328e8e89
commit 752ca8ec11

View File

@ -75,6 +75,10 @@ cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data)
) {
page->visible = true;
render_page(zathura->sync.render_thread, page);
} else {
page->visible = false;
cairo_surface_destroy(page->surface);
page->surface = NULL;
}
free(offset);