Fix T65960 Crash on entering Edit Mode of BesierCurve with modifiers
This commit is contained in:
@@ -269,7 +269,9 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob)
|
||||
}
|
||||
|
||||
geom = DRW_cache_curve_edge_wire_get(ob);
|
||||
DRW_shgroup_call(wire_shgrp, geom, ob);
|
||||
if (geom) {
|
||||
DRW_shgroup_call(wire_shgrp, geom, ob);
|
||||
}
|
||||
|
||||
if ((cu->flag & CU_3D) && (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_CU_NORMALS) != 0) {
|
||||
geom = DRW_cache_curve_edge_normal_get(ob);
|
||||
@@ -282,17 +284,23 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob)
|
||||
}
|
||||
|
||||
geom = DRW_cache_curve_vert_overlay_get(ob, stl->g_data->show_handles);
|
||||
DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob);
|
||||
if (geom) {
|
||||
DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ob->type == OB_SURF) {
|
||||
if (BKE_object_is_in_editmode(ob)) {
|
||||
struct GPUBatch *geom = DRW_cache_curve_edge_overlay_get(ob);
|
||||
DRW_shgroup_call(stl->g_data->overlay_edge_shgrp, geom, ob);
|
||||
if (geom) {
|
||||
DRW_shgroup_call(stl->g_data->overlay_edge_shgrp, geom, ob);
|
||||
}
|
||||
|
||||
geom = DRW_cache_curve_vert_overlay_get(ob, false);
|
||||
DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob);
|
||||
if (geom) {
|
||||
DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user