The mode thread will not be joined multiple times as this causes segfaults under musl

This commit is contained in:
Scoopta 2020-10-02 20:54:36 -07:00
parent 952ec178f0
commit 5a6118f097

View File

@ -103,6 +103,7 @@ static uint32_t line_count = 0;
static bool dynamic_lines;
static struct wl_list mode_list;
static pthread_t mode_thread;
static bool has_joined_mode = false;
static struct map* keys;
@ -596,7 +597,10 @@ static gboolean _insert_widget(gpointer data) {
}
static gboolean insert_all_widgets(gpointer data) {
if(!has_joined_mode) {
pthread_join(mode_thread, NULL);
has_joined_mode = true;
}
struct wl_list* modes = data;
if(modes->prev == modes) {
return FALSE;