]> git.tuebingen.mpg.de Git - paraslash.git/commit
Fix mood reload.
authorAndre Noll <maan@systemlinux.org>
Sun, 27 Jan 2013 18:12:57 +0000 (19:12 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 10 Feb 2013 15:58:12 +0000 (16:58 +0100)
commitff47d38b16a15f57ac8804ae599c8d020de8b2f3
tree1f0c7a702a3aa02bdbc0a3301e513c0aff38dc1b
parentab0ccdfcabd85453d155f913a8024f0be38e427e
Fix mood reload.

There was some confusion about how to determine whether the dummy mode
is currently active. At some places we tested if current_mood is NULL,
at others if current_mood->name is NULL. In fact neither check works:

* if a playlist is open, current_mood is NULL (but the dummy
mood is not loaded),

* loading the dummy mood currently sets current_mood->name to
"(dummy)".

This patch makes the latter variant the official one and fixes up
the code accordingly.

This also fixes the critical log message

Jan 27 18:57:29 (5) (13487) afs_event: table moods, event 9: key not found in rbtree

which occured if the dummy mood was active while an event caused the
mood to be reloaded.
mood.c