diff options
Diffstat (limited to 'source/blender/editors/space_clip/clip_graph_ops.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_graph_ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 074d76c1a41..8596c8fb19a 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -193,10 +193,10 @@ static bool mouse_select_knot(bContext *C, float co[2], bool extend) if (userdata.marker) { int x1, y1, x2, y2; - UI_view2d_view_to_region_clip(v2d, co[0], co[1], &x1, &y1); - UI_view2d_view_to_region_clip(v2d, userdata.min_co[0], userdata.min_co[1], &x2, &y2); - - if (abs(x2 - x1) <= delta && abs(y2 - y1) <= delta) { + if (UI_view2d_view_to_region_clip(v2d, co[0], co[1], &x1, &y1) && + UI_view2d_view_to_region_clip(v2d, userdata.min_co[0], userdata.min_co[1], &x2, &y2) && + (abs(x2 - x1) <= delta && abs(y2 - y1) <= delta)) + { if (!extend) { SelectUserData selectdata = {SEL_DESELECT}; |