mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-24 20:51:35 +00:00
[ui] Plug a hierarchy reference leak
I'm not entirely sure what's going on yet, but deleting the referenced view via its entity rather than the view results in a corrupted href in the component pool (with a null entity id in the dense array) and then an href component leak (as well as some very weird numbers when dumping canvas bounds). I suspect Hierref_DestroyComponent is missing a few steps (though I do need to verify that it's getting called in this particular case).
This commit is contained in:
parent
dd11a7b378
commit
767f4ff02e
1 changed files with 9 additions and 0 deletions
|
@ -133,7 +133,16 @@ imui_reference_destroy (void *_ref)
|
||||||
{
|
{
|
||||||
imui_reference_t *ref = _ref;
|
imui_reference_t *ref = _ref;
|
||||||
if (ref->ctx) {
|
if (ref->ctx) {
|
||||||
|
#if 1
|
||||||
|
//FIXME there's something wrong such that deleting the entity directly
|
||||||
|
//instead of via a view results in corrupted href componets and an
|
||||||
|
//href component leak
|
||||||
|
auto ctx = ref->ctx;
|
||||||
|
auto view = View_FromEntity (ctx->vsys, ref->ref_id);
|
||||||
|
View_Delete (view);
|
||||||
|
#else
|
||||||
ECS_DelEntity (ref->ctx->csys.reg, ref->ref_id);
|
ECS_DelEntity (ref->ctx->csys.reg, ref->ref_id);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue