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:
authorKent Mein <mein@cs.umn.edu>2006-10-26 22:58:07 +0400
committerKent Mein <mein@cs.umn.edu>2006-10-26 22:58:07 +0400
commit7fdf2a230360ff3b87a69145b4378e1055a6275b (patch)
tree28b9cc853d1311cad59fe3faaef0d83c256581da /source/blender
parent06d047ddfa8eed433f2d0507aeb3b6d87f83b480 (diff)
more bugs found thanks to klockwork
I basically added some checks to see if we have a buffer before trying to actually use them. Kent
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/imbuf/intern/antialias.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/antialias.c b/source/blender/imbuf/intern/antialias.c
index 0a6e0fcafce..bf8d0d17daf 100644
--- a/source/blender/imbuf/intern/antialias.c
+++ b/source/blender/imbuf/intern/antialias.c
@@ -113,6 +113,9 @@ static ListBase * scanimage(struct ImBuf * ibuf, int dir)
col2 = rect[0];
if (compare(col1, col2)) {
edge = NEW(Edge);
+
+ if (edge == NULL) return(0);
+
edge->position = x;
edge->col1 = col1;
edge->col2 = col2;
@@ -312,6 +315,7 @@ void IMB_antialias(struct ImBuf * ibuf)
if (ibuf == 0) return;
cbuf = IMB_dupImBuf(ibuf);
+ if (cbuf == 0) return;
anti_a = (anti_mask >> 24) & 0xff;
anti_b = (anti_mask >> 16) & 0xff;
@@ -359,11 +363,13 @@ static void _intel_scale(struct ImBuf * ibuf, ListBase * listarray, int dir)
return;
}
+ if (tbuf == NULL) return;
+
imb_freerectImBuf(ibuf);
+
ibuf->rect = tbuf->rect;
ibuf->mall |= IB_rect;
-
ibuf->x = tbuf->x;
ibuf->y = tbuf->y;
tbuf->rect = 0;