DRW: Fix assert with BoundBox object display mode
authorClément Foucault <foucault.clem@gmail.com>
Tue, 16 Oct 2018 20:52:00 +0000 (22:52 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 16 Oct 2018 20:53:32 +0000 (22:53 +0200)
source/blender/draw/modes/object_mode.c

index 20abfbf33482d6ba847703a9a79ffcb611ed1207..222a5977665715aa08e14fdc6a73331234b938d8 100644 (file)
@@ -2812,7 +2812,8 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
                        DRW_shgroup_relationship_lines(sgl, draw_ctx->depsgraph, scene, ob);
                }
 
-               if ((ob->dtx != 0) && theme_id == TH_UNDEFINED) {
+               const bool draw_extra = (ob->dtx != 0 || ob->dt == OB_BOUNDBOX);
+               if (draw_extra && (theme_id == TH_UNDEFINED)) {
                        theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL);
                }