From 88a99d9722f6c61cf8a338002d7a38622a1168ef Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 2 Apr 2014 21:56:34 +0100 Subject: Fix logic error found by cppcheck. --- riscos/toolbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'riscos/toolbar.c') diff --git a/riscos/toolbar.c b/riscos/toolbar.c index 93c4438c3..34d61715f 100644 --- a/riscos/toolbar.c +++ b/riscos/toolbar.c @@ -1579,7 +1579,7 @@ bool ro_toolbar_set_button_order(struct toolbar *toolbar, char order[]) void ro_toolbar_set_button_shaded_state(struct toolbar *toolbar, button_bar_action action, bool shaded) { - if (toolbar == NULL && toolbar->buttons == NULL) + if (toolbar == NULL || toolbar->buttons == NULL) return; ro_gui_button_bar_shade_button(toolbar->buttons, action, shaded); -- cgit v1.2.3