mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 23:42:16 -05:00
- resource leak in pointcache, opendir without closedir()
- reading pointcache was using an incorrect, always NULL variable. - commented NDof code, was giving warnings and isnt used now.
This commit is contained in:
parent
e70ca00f71
commit
5af9e5fda9
4 changed files with 8 additions and 3 deletions
|
@ -2863,6 +2863,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
|
|||
}
|
||||
}
|
||||
}
|
||||
closedir(dir);
|
||||
|
||||
strcpy(pid->cache->name, old_name);
|
||||
}
|
||||
|
|
|
@ -2981,9 +2981,8 @@ static void direct_link_pointcache(FileData *fd, PointCache *cache)
|
|||
|
||||
static void direct_link_pointcache_list(FileData *fd, ListBase *ptcaches, PointCache **ocache, int force_disk)
|
||||
{
|
||||
PointCache *cache= NULL;
|
||||
|
||||
if(ptcaches->first) {
|
||||
PointCache *cache= NULL;
|
||||
link_list(fd, ptcaches);
|
||||
for(cache=ptcaches->first; cache; cache=cache->next) {
|
||||
direct_link_pointcache(fd, cache);
|
||||
|
@ -3001,7 +3000,7 @@ static void direct_link_pointcache_list(FileData *fd, ListBase *ptcaches, PointC
|
|||
direct_link_pointcache(fd, *ocache);
|
||||
if(force_disk) {
|
||||
(*ocache)->flag |= PTCACHE_DISK_CACHE;
|
||||
cache->step = 1;
|
||||
(*ocache)->step = 1;
|
||||
}
|
||||
|
||||
ptcaches->first = ptcaches->last = *ocache;
|
||||
|
|
|
@ -2799,6 +2799,7 @@ void filterNDOFvalues(float *sbval)
|
|||
sbval[i]=0.0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// statics for controlling rv3d->dist corrections.
|
||||
// viewmoveNDOF zeros and adjusts rv3d->ofs.
|
||||
// viewmove restores based on dz_flag state.
|
||||
|
@ -3139,6 +3140,7 @@ void viewmoveNDOF(Scene *scene, ARegion *ar, View3D *v3d, int UNUSED(mode))
|
|||
*/
|
||||
// XXX scrarea_do_windraw(curarea);
|
||||
}
|
||||
#endif // if 0, unused NDof code
|
||||
|
||||
/* give a 4x4 matrix from a perspective view, only needs viewquat, ofs and dist
|
||||
* basically the same as...
|
||||
|
|
|
@ -75,6 +75,9 @@ void IMB_thumb_makedirs(void);
|
|||
ImBuf *IMB_loadblend_thumb(const char *path);
|
||||
void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float aspect);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _IMB_THUMBS_H */
|
||||
|
||||
|
|
Loading…
Reference in a new issue