diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-11-10 13:21:14 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-11-10 13:21:14 +0300 |
commit | bb3cd048872cc1056f4b2bfeaa9ebd2c69c46285 (patch) | |
tree | 8ddcecb01c373c40800e99c278f0d3309594b638 /source/blender/editors/uvedit | |
parent | 1a0198ee12afa4f174d49001617069bdc68a66bb (diff) |
"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.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 3 |
1 files changed, 3 insertions, 0 deletions
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]; |