nsxive438009
Merge branch 'nsxiv:master' into master
+2 −4
1 file changed
- M main.c +2 −4
| @@ -195,13 +195,11 @@ void remove_file(int n, bool manual) | |||
| 195 | 195 | if (files[n].path != files[n].name) | |
| 196 | 196 | free((void*) files[n].path); | |
| 197 | 197 | free((void*) files[n].name); | |
| 198 | + | if (tns.thumbs != NULL) | |
| 199 | + | tns_unload(&tns, n); | |
| 198 | 200 | ||
| 199 | 201 | if (n + 1 < filecnt) { | |
| 200 | 202 | if (tns.thumbs != NULL) { | |
| 201 | − | if (tns.thumbs[n].im != NULL) { | |
| 202 | − | imlib_context_set_image(tns.thumbs[n].im); | |
| 203 | − | imlib_free_image_and_decache(); | |
| 204 | − | } | |
| 205 | 203 | memmove(tns.thumbs + n, tns.thumbs + n + 1, (filecnt - n - 1) * | |
| 206 | 204 | sizeof(*tns.thumbs)); | |
| 207 | 205 | memset(tns.thumbs + filecnt - 1, 0, sizeof(*tns.thumbs)); | |