Correct missing NULL check in recent changes

This commit is contained in:
Campbell Barton 2018-11-23 18:12:28 +11:00
parent 7a7c9ee71a
commit 4ed7c10a32
Notes: blender-bot 2023-02-14 04:57:52 +01:00
Referenced by issue #58008, Crash after deleting something on the scene and then clicking on the viewport
1 changed files with 1 additions and 1 deletions

View File

@ -896,7 +896,7 @@ static bool drw_select_loop_pass(eDRWSelectStage stage, void *user_data)
eV3DSelectObjectFilter ED_view3d_select_filter_from_mode(const Scene *scene, const Object *obact)
{
if (scene->toolsettings->object_flag & SCE_OBJECT_MODE_LOCK) {
if ((obact->mode & OB_MODE_WEIGHT_PAINT) &&
if (obact && (obact->mode & OB_MODE_WEIGHT_PAINT) &&
BKE_object_pose_armature_get((Object *)obact))
{
return VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK;