diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-12-05 14:03:16 +0300 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-12-05 14:03:16 +0300 |
commit | 4a9898308eb2734c90248b4c868f0bdb5762a4e4 (patch) | |
tree | eaf655bdcef144708a7f4b33d1bed212227ef92b | |
parent | 4ae12f3af508c0efe9ab72755fd9bd434ef90b8a (diff) |
corrected problems using different filters: Freestyle pixels were being fetched outside of the render result rect. Corrected with a test to make sure that the used pixels are valid.
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 4a86c191a03..5f7967d85db 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -919,7 +919,10 @@ static void freestyle_enhance_add(RenderPart *pa, RenderLayer *rl) for( y = pa->disprect.ymin; y < pa->disprect.ymax; y++) { for( x = pa->disprect.xmin; x < pa->disprect.xmax; x++, od++) { int sample; - + + if( x < 0 || y < 0 || x > R.rectx - 1 || y > R.recty - 1 ) + continue; + freestyle = freestyle_rl->rectf + 4 * (R.rectx * y + x); if( freestyle[3] > 0.0) { for( sample = 0; sample < totsample; sample++) { |