fix eval space creation for nil entities

This commit is contained in:
Ryan Fleury
2026-05-19 11:14:19 -07:00
parent 1a48155116
commit 3360d97e37
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1306,7 +1306,7 @@ di_search_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *
}
lane_sync();
//- rjf: sort records if we have a query
//- rjf: sort records
if(!cancelled) ProfScope("sort records")
{
//- rjf: set up common data
+7 -3
View File
@@ -704,9 +704,13 @@ rd_ctrl_entity_from_eval_space(E_Space space)
internal E_Space
rd_eval_space_from_ctrl_entity(D_Entity *entity, E_SpaceKind kind)
{
E_Space space = e_space_make(kind);
space.u64s[0] = (((U64)entity->handle.machine_id) << 32) | (((U64)entity->handle.controller_kind) << 0);
space.u64s[1] = entity->handle.entity_id;
E_Space space = {0};
if(entity != &d_entity_nil)
{
space = e_space_make(kind);
space.u64s[0] = (((U64)entity->handle.machine_id) << 32) | (((U64)entity->handle.controller_kind) << 0);
space.u64s[1] = entity->handle.entity_id;
}
return space;
}