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>2015-02-11 17:29:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-11 18:17:03 +0300
commit3b5eac548fe13e2a93ae6a8dedd4c632edf950a0 (patch)
treec28c557c2d39c0b87a34df786df036ddae661287 /source/blender/editors/interface/interface_eyedropper.c
parent44f09c93d1e2b627c30186a446eee8d39f45ccbc (diff)
Fix depth-eyedropper crashing outside 3d view
Also set the eyedropper operators as internal.
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper.c')
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
index f5b24f49f98..aabb8e29fa9 100644
--- a/source/blender/editors/interface/interface_eyedropper.c
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -370,10 +370,11 @@ void UI_OT_eyedropper_color(wmOperatorType *ot)
ot->poll = eyedropper_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
/* properties */
}
+
/** \} */
@@ -641,13 +642,14 @@ void UI_OT_eyedropper_id(wmOperatorType *ot)
ot->poll = datadropper_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
/* properties */
}
/** \} */
+
/* -------------------------------------------------------------------- */
/* Depth Dropper
*
@@ -696,7 +698,7 @@ static int depthdropper_init(bContext *C, wmOperator *op)
/* fallback to the active camera's dof */
if (ddr->prop == NULL) {
RegionView3D *rv3d = CTX_wm_region_view3d(C);
- if (rv3d->persp == RV3D_CAMOB) {
+ if (rv3d && rv3d->persp == RV3D_CAMOB) {
View3D *v3d = CTX_wm_view3d(C);
if (v3d->camera && v3d->camera->data && (((ID *)v3d->camera->data)->lib == NULL)) {
RNA_id_pointer_create(v3d->camera->data, &ddr->ptr);
@@ -946,7 +948,7 @@ void UI_OT_eyedropper_depth(wmOperatorType *ot)
ot->poll = depthdropper_poll;
/* flags */
- ot->flag = OPTYPE_BLOCKING;
+ ot->flag = OPTYPE_BLOCKING | OPTYPE_INTERNAL;
/* properties */
}