diff options
author | Andrea Weikert <elubie@gmx.net> | 2011-05-18 23:42:30 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2011-05-18 23:42:30 +0400 |
commit | c04f9b779c4384f3cc6961b2ed54456bdab14f43 (patch) | |
tree | ef03665fdb965eac3636f89e837344723ed7a2ec /source/blender/editors/space_file/filelist.c | |
parent | 91bd739a093f8bb3613f52b6a0edeacfd8c09d66 (diff) |
fix [#27158] Appending crash with preview.
* fixed incorrect reading of PreviewImage struct from .blend
* fixed memory leak, PreviewImage data wasn't correctly free'd
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 4daaea4513c..9b65589ef4c 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -59,6 +59,7 @@ #include "BKE_context.h" #include "BKE_global.h" #include "BKE_library.h" +#include "BKE_icons.h" #include "BKE_main.h" #include "BKE_report.h" #include "BLO_readfile.h" @@ -999,7 +1000,7 @@ static int groupname_to_code(char *group) return BKE_idcode_from_name(buf); } - + void filelist_from_library(struct FileList* filelist) { LinkNode *l, *names, *previews; @@ -1086,7 +1087,7 @@ void filelist_from_library(struct FileList* filelist) } BLI_linklist_free(names, free); - if (previews) BLI_linklist_free(previews, (void(*)(void*)) MEM_freeN); + if (previews) BLI_linklist_free(previews, BKE_previewimg_freefunc); filelist_sort(filelist, FILE_SORT_ALPHA); |