From 3d25681eb65376f35a051196dfd316c6fcbc7fa9 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 4 Nov 2010 13:39:33 +0100 Subject: get_input: only handle inputs, when context is ready --- src/interface.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/interface.c') diff --git a/src/interface.c b/src/interface.c index a4a03cb..15a8fbb 100644 --- a/src/interface.c +++ b/src/interface.c @@ -16,6 +16,7 @@ #define H_MSG_BOX 3 extern pa_context* context; +extern gboolean context_ready; static WINDOW *menu_win; static WINDOW *msg_win; @@ -167,6 +168,9 @@ gboolean get_input(gpointer data) gint c; gboolean volume_increment = TRUE; + if (!context_ready) + return FALSE; + c = wgetch(menu_win); switch (c) { case 'k': -- cgit