"Fix" for [#24629] 2D-cursor coordinates in 254B UV and 3D views

* This null check just prevents the crash, but the real bug is that 3d view toolbar redo even shows the image view operator..
* ..and since the redo is in the wrong view it doesn't work. Both of these are known issues.
This commit is contained in:
Janne Karhu
2010-11-10 10:21:14 +00:00
parent 1a0198ee12
commit bb3cd04887

View File

@@ -3029,6 +3029,9 @@ static int set_2d_cursor_exec(bContext *C, wmOperator *op)
SpaceImage *sima = CTX_wm_space_image(C);
float location[2];
if(!sima)
return OPERATOR_CANCELLED;
RNA_float_get_array(op->ptr, "location", location);
sima->cursor[0]= location[0];
sima->cursor[1]= location[1];