From bb3cd048872cc1056f4b2bfeaa9ebd2c69c46285 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 10 Nov 2010 10:21:14 +0000 Subject: [PATCH] "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. --- source/blender/editors/uvedit/uvedit_ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index d8c618d4d07..a3364223d28 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -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];