summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/view/viewer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/view/viewer.c b/src/view/viewer.c
index 96a05b6..52c5bc7 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -510,14 +510,10 @@ static bool _viewer_add(struct _priv *priv, int id)
static void _viewer_delete(struct _priv *priv)
{
- struct controller *ctl;
int i;
- for (i = 0; i < VIEWER_MAX; i++) {
- ctl = priv->viewer.ctl[i];
- if (ctl)
- controller_destroy(ctl->handle);
- }
+ for (i = 0; i < VIEWER_MAX; i++)
+ controller_destroy(priv->viewer.ctl[i]);
}
static bool _viewer_prev(struct _priv *priv)