mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-01 13:30:42 +00:00
[ui] Access the canvas visibility flag safely
That wasn't so well thought out as adding fields before the flag made for some rather interesting behavior.
This commit is contained in:
parent
bf05da26cc
commit
ad9e85b8d4
1 changed files with 2 additions and 1 deletions
|
@ -116,7 +116,8 @@ bool *
|
|||
Canvas_Visible (canvas_system_t canvas_sys, uint32_t ent)
|
||||
{
|
||||
uint32_t comp = canvas_sys.base + canvas_canvas;
|
||||
return Ent_GetComponent (ent, comp, canvas_sys.reg);
|
||||
auto canvas = (canvas_t *) Ent_GetComponent (ent, comp, canvas_sys.reg);
|
||||
return &canvas->visible;
|
||||
}
|
||||
|
||||
#undef CANVASINLINE
|
||||
|
|
Loading…
Reference in a new issue