summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 82ed674..5428653 100644
--- a/src/main.c
+++ b/src/main.c
@@ -248,6 +248,9 @@ int main (int argc, char **argv) {
BarUiStartEventCmd (&settings, "songstart", curStation,
playlist, &player, PIANO_RET_OK);
+ /* prevent race condition, mode must _not_ be FREED if
+ * thread has been started */
+ player.mode = PLAYER_STARTING;
/* start player */
pthread_create (&playerThread, NULL, BarPlayerThread,
&player);