diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-28 12:47:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-28 13:49:36 +0300 |
commit | 00230608936e4bf2143ac4caaff3fdcbe77bda3e (patch) | |
tree | 4e692fb780be5dfe351091c2e00855653b2de624 | |
parent | 12622ce2f7fc8322c4d1ff020f655b138ef1e293 (diff) |
Cleanup: compiler warnings.
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index aa163e02cfe..4bd8c28a85c 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -753,7 +753,7 @@ static short gp_stroke_addpoint( if (gp_stroke_added_check(p)) { bGPDstroke *gps = p->gpf->strokes.last; bGPDspoint *pts; - MDeformVert *dvert; + MDeformVert *dvert = NULL; /* first time point is adding to temporary buffer -- need to allocate new point in stroke */ if (gpd->runtime.sbuffer_size == 0) { @@ -792,7 +792,7 @@ static short gp_stroke_addpoint( pts->uv_fac = pt->uv_fac; pts->uv_rot = pt->uv_rot; - if (gps->dvert != NULL) { + if (dvert != NULL) { dvert->totweight = 0; dvert->dw = NULL; } diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 7ecd2c69838..280b8f91151 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1754,9 +1754,13 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de ED_view3d_viewcontext_init_object(&vc, basact->object); em = vc.em; } + else { + em = NULL; + } + em_original->selectmode = selectmode; - if (eed == NULL) { + if (em == NULL || eed == NULL) { return false; } |