Fix: Overlay-Next: Null batch dereference

This commit is contained in:
Clément Foucault
2024-11-26 14:51:39 +01:00
parent 889ca87048
commit d7d0b72be5
2 changed files with 5 additions and 0 deletions

View File

@@ -176,6 +176,7 @@ class Outline : Overlay {
break;
case OB_VOLUME:
geom = DRW_cache_volume_selection_surface_get(ob_ref.object);
/* TODO(fclem): Get rid of these check and enforce correct API on the batch cache. */
if (geom) {
prepass_volume_ps_->draw(geom, manager.unique_handle(ob_ref));
}

View File

@@ -201,6 +201,10 @@ class Prepass : Overlay {
}
geom_single = DRW_cache_volume_selection_surface_get(ob_ref.object);
pass = mesh_ps_;
/* TODO(fclem): Get rid of these check and enforce correct API on the batch cache. */
if (geom_single == nullptr) {
return;
}
break;
case OB_POINTCLOUD:
geom_single = point_cloud_sub_pass_setup(*point_cloud_ps_, ob_ref.object);