diff options
-rw-r--r-- | source/blender/imbuf/intern/anim5.c | 2 | ||||
-rw-r--r-- | source/blender/src/editmesh_tools.c | 26 | ||||
-rw-r--r-- | source/blender/src/imagepaint.c | 3 |
3 files changed, 17 insertions, 14 deletions
diff --git a/source/blender/imbuf/intern/anim5.c b/source/blender/imbuf/intern/anim5.c index ab203fe80de..b6f29b6a145 100644 --- a/source/blender/imbuf/intern/anim5.c +++ b/source/blender/imbuf/intern/anim5.c @@ -425,7 +425,7 @@ int startanim5(struct anim * anim) { /* de hele file wordt in het geheugen gemapped */ totlen = BLI_filesize(file); - if (totlen && file>=0) { + if (totlen>0 && file>=0) { lseek(file, 0L, SEEK_SET); mem= MEM_mallocN(totlen, "mmap"); diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 690b4481ec9..377cb42e2f5 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -2520,11 +2520,13 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype) } } } - sort[hold]->f &= ~SELECT; - sort[hold]->f2 |= EDGENEW; - length[hold] = -1; - } - } + if (hold > -1) { + sort[hold]->f &= ~SELECT; + sort[hold]->f2 |= EDGENEW; + length[hold] = -1; + } + } + } // Beauty Long Edges else { @@ -2541,13 +2543,15 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype) } } } - sort[hold]->f &= ~SELECT; - sort[hold]->f2 |= EDGENEW; - length[hold] = -1; - } - } + if (hold > -1) { + sort[hold]->f &= ~SELECT; + sort[hold]->f2 |= EDGENEW; + length[hold] = -1; + } + } + } } - } + } } gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp); diff --git a/source/blender/src/imagepaint.c b/source/blender/src/imagepaint.c index ede6679b9f5..4d6c0898bce 100644 --- a/source/blender/src/imagepaint.c +++ b/source/blender/src/imagepaint.c @@ -708,8 +708,7 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float } ibuf = BKE_image_get_ibuf((Image *)tf->tpage, NULL); /* TODO - this may be slow, the only way around it is to have an ibuf index per face */ - - + if (!ibuf) return 0; if (interp) { float x, y; |