diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-01-10 05:20:30 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-01-10 05:20:30 +0300 |
commit | 83806d40429f3c847a3265cdb1cfe20bf6b08c3d (patch) | |
tree | 9cb335681036bde12298471011e1f82433f47e3c /source/blender | |
parent | 56db5f10aab70fe9f99c830efbafd77b5f8b6c49 (diff) |
Bug fix: particles dying in collisions could lead to crash in some cases
* Forgot to check for index range in own recent pointcache commit.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 5408e57f10d..c4f1690e474 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1213,7 +1213,7 @@ int BKE_ptcache_mem_index_find(PTCacheMem *pm, unsigned int index) return -1; /* check simple case for continuous indexes first */ - if(data[index-*data]==index) + if(index-*data < high && data[index-*data] == index) return index-*data; while(low <= high) { |