Fix T79503: Selecting edit-bones while holding Ctrl crashes

This commit is contained in:
Campbell Barton 2020-08-04 21:23:01 +10:00
parent f921ae4665
commit 164f40c50a
Notes: blender-bot 2023-09-13 08:48:34 +02:00
Referenced by issue #80404, Selecting posebones while holding CTRL in weightpaint exits weightpaint mode
Referenced by issue #79503, Ctrl-LMB on Bone: Crash
2 changed files with 3 additions and 3 deletions

View File

@ -1960,7 +1960,7 @@ void DRW_render_instance_buffer_finish(void)
void DRW_draw_select_loop(struct Depsgraph *depsgraph,
ARegion *region,
View3D *v3d,
bool UNUSED(use_obedit_skip),
bool use_obedit_skip,
bool draw_surface,
bool UNUSED(use_nearest),
const rcti *rect,
@ -1973,7 +1973,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph,
RenderEngineType *engine_type = ED_view3d_engine_type(scene, v3d->shading.type);
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
Object *obact = OBACT(view_layer);
Object *obedit = OBEDIT_FROM_OBACT(obact);
Object *obedit = use_obedit_skip ? NULL : OBEDIT_FROM_OBACT(obact);
#ifndef USE_GPU_SELECT
UNUSED_VARS(scene, view_layer, v3d, region, rect);
#else

View File

@ -2113,7 +2113,7 @@ static bool ed_object_select_pick(bContext *C,
if (hits > 0) {
/* note: bundles are handling in the same way as bones */
const bool has_bones = selectbuffer_has_bones(buffer, hits);
const bool has_bones = object ? false : selectbuffer_has_bones(buffer, hits);
/* note; shift+alt goes to group-flush-selecting */
if (enumerate) {