From 8904429287fa0104e9b8ea2b93c8aabb995b3396 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 22 Jul 2012 14:22:07 +0000 Subject: [PATCH] Fix #32156: Blender crashes on linking armature with custom shape Crash was caused by using NULL pointer as a wire color for drawing object selection when drawing flag is set to DRAW_CONSTCOLOR. Solved by not calling drawObjectSelect when DRAW_CONSTCOLOR flag is set, which seems reasonable -- rather than adding checks deeper in all possible functions which are being called there easier to just not call that functions using a single check. --- source/blender/editors/space_view3d/drawobject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index d20b0eb991f..37e71e998f6 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -6682,8 +6682,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short /* draw outline for selected objects, mesh does itself */ if ((v3d->flag & V3D_SELECT_OUTLINE) && ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) && ob->type != OB_MESH) { if (dt > OB_WIRE && (ob->mode & OB_MODE_EDIT) == 0 && (dflag & DRAW_SCENESET) == 0) { - if (!(ob->dtx & OB_DRAWWIRE) && (ob->flag & SELECT) && !(dflag & DRAW_PICKING)) { - + if (!(ob->dtx & OB_DRAWWIRE) && (ob->flag & SELECT) && !(dflag & (DRAW_PICKING | DRAW_CONSTCOLOR))) { drawObjectSelect(scene, v3d, ar, base, ob_wire_col); } }