diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-28 01:03:14 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-28 01:07:03 +0300 |
commit | b838eaf2b960af5877d77eed1ef1ad4ede1071f0 (patch) | |
tree | fdee25950a9afe01381e36993d2c8542a4f94d73 /source/blender/editors/space_view3d/view3d_cursor_snap.c | |
parent | b69195dd1398bea4aca5fd5ea633991fd05bee9d (diff) |
Cleanup: remove 'ED_view3d_cursor_snap_exit'
The callers of `ED_view3d_cursor_snap_active` that must handle the snapping of the cursor.
Forcing release at the end can hide leaks.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_cursor_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_cursor_snap.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c index 75d2ff8b1ce..e8f1e011364 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -883,16 +883,16 @@ static void v3d_cursor_snap_activate(void) static void v3d_cursor_snap_free(void) { SnapCursorDataIntern *data_intern = &g_data_intern; - if (data_intern->handle && G_MAIN->wm.first) { - WM_paint_cursor_end(data_intern->handle); + if (data_intern->handle) { + if (G_MAIN->wm.first) { + WM_paint_cursor_end(data_intern->handle); + } data_intern->handle = NULL; } if (data_intern->snap_context_v3d) { ED_transform_snap_object_context_destroy(data_intern->snap_context_v3d); data_intern->snap_context_v3d = NULL; } - - BLI_freelistN(&data_intern->state_intern); } void ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state) @@ -974,8 +974,3 @@ struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(Scene *scene) v3d_cursor_snap_context_ensure(scene); return data_intern->snap_context_v3d; } - -void ED_view3d_cursor_snap_exit(void) -{ - v3d_cursor_snap_free(); -} |