aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/src/gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/src/gui.c b/src/gui/src/gui.c
index f65ed91..022ce73 100644
--- a/src/gui/src/gui.c
+++ b/src/gui/src/gui.c
@@ -79,10 +79,10 @@ void gui_add_child(struct gui_common *const p,
int gui_update(struct gui_common *const g, const union peripheral *const p,
const struct camera *const c)
{
- if (g->cb && g->cb->update && g->cb->update(g, p, c))
+ if (g->child && gui_update(g->child, p, c))
return -1;
- if (g->child && gui_update(g->child, p, c))
+ if (g->cb && g->cb->update && g->cb->update(g, p, c))
return -1;
for (struct gui_common *s = g->sibling; s; s = s->sibling)