diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-04 16:46:49 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-04 16:46:49 +0800 |
commit | 3e7c36a33f512e47b9bc293db93112c109caaf0b (patch) | |
tree | 9645569ebde813626b1781bfcc5873182732928c /embed/ephy-web-view.c | |
parent | aea0c271af64fef12c887c04cc2f760aca8391f8 (diff) | |
download | gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.tar gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.tar.gz gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.tar.bz2 gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.tar.lz gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.tar.xz gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.tar.zst gsoc2013-epiphany-3e7c36a33f512e47b9bc293db93112c109caaf0b.zip |
ephy-web-view: don't leak the snapsoht cairo surface
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 234126e60..ece575b82 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -2103,12 +2103,15 @@ web_view_check_snapshot (WebKitWebView *web_view) { EphyOverviewStore *store; GtkTreeIter iter; + cairo_surface_t *surface; store = EPHY_OVERVIEW_STORE (ephy_embed_shell_get_frecent_store (embed_shell)); if (ephy_overview_store_find_url (store, webkit_web_view_get_uri (web_view), &iter) && - ephy_overview_store_needs_snapshot (store, &iter)) - ephy_overview_store_set_snapshot (store, &iter, - webkit_web_view_get_snapshot (web_view)); + ephy_overview_store_needs_snapshot (store, &iter)) { + surface = webkit_web_view_get_snapshot (web_view); + ephy_overview_store_set_snapshot (store, &iter, surface); + cairo_surface_destroy (surface); + } return FALSE; } |