'Fix' [#21843] Manipulating Set Render Border sliders causes a crash

Just make the operator cancel if the region in the context is not a RegionView3d.
This is not an issue isolated to this operator, it affects other ones that require a
RegionView3d too, like knife. One to solve for later, at least this doesn't crash now.
This commit is contained in:
Matt Ebb
2010-04-05 08:13:04 +00:00
parent 35d7c86b14
commit fee3daee56

View File

@@ -1493,6 +1493,9 @@ static int render_border_exec(bContext *C, wmOperator *op)
rect.xmax= RNA_int_get(op->ptr, "xmax");
rect.ymax= RNA_int_get(op->ptr, "ymax");
if (!ar || ar->regiontype != RGN_TYPE_WINDOW)
return OPERATOR_CANCELLED;
/* calculate range */
calc_viewborder(scene, ar, v3d, &vb);