summaryrefslogtreecommitdiff
path: root/shell/ev-sidebar-thumbnails.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2020-01-19 14:07:19 +0100
committerraveit65 <[email protected]>2020-01-19 14:10:55 +0100
commit8082bc78d006c7bcb1e45e3f4bb6aae502741e3e (patch)
tree861e669b43abd1d7a4ec46b8ba6df541881671b1 /shell/ev-sidebar-thumbnails.c
parent5954cd9ff6832520e4f77c573177ac9b8cf48ba6 (diff)
downloadatril-8082bc78d006c7bcb1e45e3f4bb6aae502741e3e.tar.bz2
atril-8082bc78d006c7bcb1e45e3f4bb6aae502741e3e.tar.xz
Revert "Fix memory leak in ev_sidebar_thumbnails_document_changed_cb()"
This reverts commit bb8194a94310dae72bcbd745cd7f0f93e8d6fad1. Commit cases a warning when closing atril window, see https://github.com/mate-desktop/atril/pull/431#issuecomment-576002680 for more info
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r--shell/ev-sidebar-thumbnails.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index adf2cf8f..72c365ec 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -925,14 +925,10 @@ ev_sidebar_thumbnails_document_changed_cb (EvDocumentModel *model,
priv->n_pages = ev_document_get_n_pages (document);
priv->rotation = ev_document_model_get_rotation (model);
priv->inverted_colors = ev_document_model_get_inverted_colors (model);
- if (priv->loading_icons) {
- g_hash_table_remove_all (priv->loading_icons);
- } else {
- priv->loading_icons = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- (GDestroyNotify)g_free,
- (GDestroyNotify)cairo_surface_destroy);
- }
+ priv->loading_icons = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ (GDestroyNotify)g_free,
+ (GDestroyNotify)g_object_unref);
ev_sidebar_thumbnails_clear_model (sidebar_thumbnails);
ev_sidebar_thumbnails_fill_model (sidebar_thumbnails);