merge from trunk r37405
[blender.git] / source / blender / editors / space_view3d / view3d_view.c
index aadb355f743553f66d066ed1c0f1b136f7e6da09..6c2c4cfad131fd97e7d835437f0cfcf39b315135 100644 (file)
@@ -391,15 +391,12 @@ static int view3d_setcameratoview_exec(bContext *C, wmOperator *UNUSED(op))
 
 static int view3d_setcameratoview_poll(bContext *C)
 {
-       View3D *v3d= CTX_wm_view3d(C);
-       if(v3d && v3d->camera && v3d->camera->id.lib==NULL) {
-               RegionView3D *rv3d= CTX_wm_region_view3d(C);
-               if(rv3d && !rv3d->viewlock) {
-                       return 1;
-               }
-       }
+       View3D *v3d = CTX_wm_view3d(C);
+       RegionView3D *rv3d= CTX_wm_region_view3d(C);
 
-       return 0;
+       if (v3d==NULL || v3d->camera==NULL)     return 0;
+       if (rv3d && rv3d->viewlock != 0)                return 0;
+       return 1;
 }
 
 void VIEW3D_OT_setcameratoview(wmOperatorType *ot)