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>2016-04-28 17:00:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-04-28 17:00:43 +0300
commita48d7407986d04492107a2ef16d0ff6f0d012c45 (patch)
tree2e6691021cb6ee8baf627a9426e2f77101bb96e4 /source/blender/editors/mesh/editmesh_bevel.c
parent6976be772330e77950d9a65f00fdc0fe74a75b76 (diff)
Fix T48300: 3D view tools outside the 3d view crash
Diffstat (limited to 'source/blender/editors/mesh/editmesh_bevel.c')
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 847a7b5336e..5eaac72590b 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -137,8 +137,11 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal)
opdata->mesh_backup = EDBM_redo_state_store(em);
opdata->draw_handle_pixel = ED_region_draw_cb_activate(ar->type, ED_region_draw_mouse_line_cb, opdata->mcenter, REGION_DRAW_POST_PIXEL);
G.moving = G_TRANSFORM_EDIT;
- opdata->twtype = v3d->twtype;
- v3d->twtype = 0;
+
+ if (v3d) {
+ opdata->twtype = v3d->twtype;
+ v3d->twtype = 0;
+ }
}
return true;
@@ -206,7 +209,9 @@ static void edbm_bevel_exit(bContext *C, wmOperator *op)
ARegion *ar = CTX_wm_region(C);
EDBM_redo_state_free(&opdata->mesh_backup, NULL, false);
ED_region_draw_cb_exit(ar->type, opdata->draw_handle_pixel);
- v3d->twtype = opdata->twtype;
+ if (v3d) {
+ v3d->twtype = opdata->twtype;
+ }
G.moving = 0;
}
MEM_freeN(opdata);