Fix T59391: Crash snapping to active

This commit is contained in:
Sebastian Parborg 2018-12-20 06:51:28 +11:00 committed by Campbell Barton
parent 90e253d974
commit 2bc27d3dc5
Notes: blender-bot 2023-02-14 06:45:14 +01:00
Referenced by issue #59391, 2.80 Crash on selecting an entire collection and snappping cursor to active.
1 changed files with 3 additions and 0 deletions

View File

@ -759,6 +759,9 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
static bool snap_calc_active_center(bContext *C, const bool select_only, float r_center[3])
{
Object *ob = CTX_data_active_object(C);
if (ob == NULL) {
return false;
}
return ED_object_calc_active_center(ob, select_only, r_center);
}