aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorkrolyxon <106688908+krolyxon@users.noreply.github.com>2023-03-11 19:42:42 +0530
committerGitHub <noreply@github.com>2023-03-11 19:42:42 +0530
commite4380093d694f075e07f489e2c2e764785b441f2 (patch)
tree0a4e3d0a28f996d8caaaa2ecc0706e3e004f060c /main.c
parent4ef20627a785ffa91f741a86a1de29557b2337cb (diff)
parent19b47192f21939b46a8f46d131c31f138aaa3b33 (diff)
Merge branch 'nsxiv:master' into master
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/main.c b/main.c
index eed945c..9541b6d 100644
--- a/main.c
+++ b/main.c
@@ -195,13 +195,11 @@ void remove_file(int n, bool manual)
if (files[n].path != files[n].name)
free((void*) files[n].path);
free((void*) files[n].name);
+ if (tns.thumbs != NULL)
+ tns_unload(&tns, n);
if (n + 1 < filecnt) {
if (tns.thumbs != NULL) {
- if (tns.thumbs[n].im != NULL) {
- imlib_context_set_image(tns.thumbs[n].im);
- imlib_free_image_and_decache();
- }
memmove(tns.thumbs + n, tns.thumbs + n + 1, (filecnt - n - 1) *
sizeof(*tns.thumbs));
memset(tns.thumbs + filecnt - 1, 0, sizeof(*tns.thumbs));