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>2012-09-11 06:18:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-11 06:18:27 +0400
commita0ae47f06c6232a91202bd06ea173b955735596b (patch)
treed0c928e2167037eec5f01277ebe7dc0885168d59 /source/blender/editors/mesh
parent652f64762c31bd1cfcac7ae05f184b70713b2034 (diff)
add some missing NULL checks, a few parts of the code used a pointer then checked it for NULL after.
also made it more clear that some areas assume the pointer isnt null (remove redundant NULL checks).
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_bvh.c5
-rw-r--r--source/blender/editors/mesh/editmesh_select.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c
index 580592c02f6..0b7d396b696 100644
--- a/source/blender/editors/mesh/editmesh_bvh.c
+++ b/source/blender/editors/mesh/editmesh_bvh.c
@@ -398,11 +398,6 @@ int BMBVH_EdgeVisible(BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Obje
float end[3];
const float mval_f[2] = {ar->winx / 2.0f,
ar->winy / 2.0f};
-
- if (!ar) {
- printf("error in BMBVH_EdgeVisible!\n");
- return 0;
- }
ED_view3d_win_to_segment_clip(ar, v3d, mval_f, origin, end);
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 3ac011550be..dc5d1cea443 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -268,11 +268,14 @@ int EDBM_backbuf_border_mask_init(ViewContext *vc, int mcords[][2], short tot, s
/* grab mask */
bufmask = view3d_read_backbuf(vc, xmin, ymin, xmax, ymax);
- drm = bufmask->rect;
+
if (bufmask == NULL) {
return 0; /* only when mem alloc fails, go crash somewhere else! */
}
-
+ else {
+ drm = bufmask->rect;
+ }
+
/* build selection lookup */
selbuf = MEM_callocN(bm_vertoffs + 1, "selbuf");