This part of the drawing code assumes that the bone custom object
has only one evaluated geometry component, and it also uses the
object type to check which data to draw, with the functions like
DRW_cache_object_surface_get that just take an object input.
Those functions usually work on evaluaed objects, which use the
instancing system to access a temporary object with object.data
replaced.
That assumption used to work, but now curve, point cloud, or volume
objects can have an evalauted mesh, but that is not accessed with the
same object for usual drawing.
The "correct" solution for the way this code is structured would be to
loop through all of the geometry components and try to get GPU batches
from every one of them. However, that significantly increases complexity
in an area that should probably be refactored anyway. This patch treats
the mesh as a special case, and only draws the evaluated mesh.
The best solution in my opinion might be refactoring this area to
use the instancing system with some sort of viewport-only flag to
the custom shape instances aren't added in the render.