diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c index 29c4e0f2fb5..b650f3a3e98 100644 --- a/source/blender/blenkernel/intern/fluidsim.c +++ b/source/blender/blenkernel/intern/fluidsim.c @@ -36,6 +36,8 @@ #include "DNA_particle_types.h" #include "DNA_scene_types.h" // N_T +#include "PIL_time.h" // for PIL_sleep_ms + #include "BLI_arithb.h" #include "BLI_blenlib.h" diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ce154755651..0873c572382 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -133,6 +133,7 @@ #include "BKE_main.h" // for Main #include "BKE_mesh.h" // for ME_ defines (patching) #include "BKE_modifier.h" +#include "BKE_multires.h" // for multires_free #include "BKE_node.h" // for tree type defines #include "BKE_object.h" #include "BKE_particle.h" @@ -617,6 +618,11 @@ static BHeadN *get_bhead(FileData *fd) BHeadN *new_bhead = 0; int readsize; + /* not strictly needed but shuts valgrind up + * since uninitialized memory gets compared */ + memset(&bhead8, 0, sizeof(BHead8)); + memset(&bhead4, 0, sizeof(BHead4)); + if (fd) { if ( ! fd->eof) { @@ -9233,6 +9239,8 @@ void BLO_script_library_append(BlendHandle **bh, char *dir, char *name, void BLO_library_append(SpaceFile *sfile, char *dir, int idcode) { BLO_library_append_(&sfile->libfiledata, sfile->filelist, sfile->totfile, dir, sfile->file, sfile->flag, idcode); + BLO_blendhandle_close(sfile->libfiledata); + sfile->libfiledata= NULL; } void BLO_library_append_(BlendHandle** libfiledata, struct direntry* filelist, int totfile, char *dir, char* file, short flag, int idcode) diff --git a/source/blender/src/filelist.c b/source/blender/src/filelist.c index 008bcbe147d..5c8fab77e04 100644 --- a/source/blender/src/filelist.c +++ b/source/blender/src/filelist.c @@ -913,6 +913,8 @@ void BIF_filelist_from_library(struct FileList* filelist) void BIF_filelist_append_library(struct FileList *filelist, char *dir, char *file, short flag, int idcode) { BLO_library_append_(&filelist->libfiledata, filelist->filelist, filelist->numfiles, dir, file, flag, idcode); + BLO_blendhandle_close(filelist->libfiledata); + filelist->libfiledata= NULL; } void BIF_filelist_from_main(struct FileList *filelist)