Fix crash with armature custom bone in wireframe mode
authorClément Foucault <foucault.clem@gmail.com>
Tue, 18 Dec 2018 13:50:50 +0000 (14:50 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 18 Dec 2018 13:51:05 +0000 (14:51 +0100)
source/blender/draw/intern/draw_armature.c

index 3837daadd02b1afdd4c06eb59cfe17e621c5d366..8d0cae3cc4a8bf5d6cd4507df94f72f2c5c13f57 100644 (file)
@@ -364,6 +364,10 @@ static void drw_shgroup_bone_custom_wire(
 {
        /* grr, not re-using instances! */
        struct GPUBatch *geom = DRW_cache_object_wire_outline_get(custom);
+
+       /* XXXXXXX needs to be moved elsewhere. */
+       drw_batch_cache_generate_requested(custom);
+
        if (geom) {
                DRWShadingGroup *shgrp_geom_wire = shgroup_instance_wire(g_data.passes.bone_wire, geom);
                float final_bonemat[4][4], final_color[4];