Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-12 12:09:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-12 12:09:52 +0300
commit5af9e5fda96bbf47ebf6bb5cfdd6b67bcbb365cb (patch)
treefa3ee54a8e2f344013870983f4e308f53c3ea999
parente70ca00f71c8f6f3be218e9113b714df25e33deb (diff)
- 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.
-rw-r--r--source/blender/blenkernel/intern/pointcache.c1
-rw-r--r--source/blender/blenloader/intern/readfile.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/imbuf/IMB_thumbs.h3
4 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index bd919d2166d..84331e1b318 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2863,6 +2863,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
}
}
}
+ closedir(dir);
strcpy(pid->cache->name, old_name);
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index dfd586fdb9a..6f22b1ad6f2 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index bc9c41f3add..de0878925ae 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -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...
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h
index cae6edaefee..02f8e1567bf 100644
--- a/source/blender/imbuf/IMB_thumbs.h
+++ b/source/blender/imbuf/IMB_thumbs.h
@@ -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 */