summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--menus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/menus.c b/menus.c
index e65cb3a..8231707 100644
--- a/menus.c
+++ b/menus.c
@@ -261,6 +261,8 @@ void Update_Main_Menu_If_Visible(void)
void Show_Main_Menu(void)
{
+ GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+ g_static_mutex_lock (&mutex); // can be triggered simultaneously by local or remote users
char a_string[2*LCD_col_width];
char b_string[2*LCD_col_width];
@@ -989,6 +991,8 @@ void Show_Main_Menu(void)
LCD_col=(i / LCD_rows) * LCD_col_width + 1;
LCD_write_padded_spaces(LCD_row,LCD_col,"",LCD_col_width);
}
+
+ g_static_mutex_unlock (&mutex);
}