Commit: 3b5eac548fe13e2a93ae6a8dedd4c632edf950a0
Author: Campbell Barton
Date:   Thu Feb 12 01:29:33 2015 +1100
Branches: master
https://developer.blender.org/rB3b5eac548fe13e2a93ae6a8dedd4c632edf950a0

Fix depth-eyedropper crashing outside 3d view

Also set the eyedropper operators as internal.

===================================================================

M       source/blender/editors/interface/interface_eyedropper.c

===================================================================

diff --git a/source/blender/editors/interface/interface_eyedropper.c 
b/source/blender/editors/interface/interface_eyedropper.c
index f5b24f4..aabb8e2 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 */
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to