aboutsummaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index 8b3d49f..5581bdc 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -203,7 +203,7 @@ ui_thrd(void *arg)
pthread_mutex_lock(&mtx_update);
while ( ui_ipc_getvalue(SEM_UI) > 0 ) {
cnd_ret = pthread_cond_timedwait(&cnd_update, &mtx_update, &wait);
- if (--atmout == 0) ui_ipc_semtrywait(SEM_UI);
+ if (--atmout <= 0) ui_ipc_semtrywait(SEM_UI);
pthread_mutex_lock(&mtx_busy);
do_ui_update( (cnd_ret == ETIMEDOUT ? true : false) );
pthread_mutex_unlock(&mtx_busy);