summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-07 22:23:13 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-07 22:23:13 +0100
commitbb4057a3cc7cb28829eb44cf05e3c325939ae3fe (patch)
treee69bbabdcf0b9b072c4ad047cd01ad67df163abb /main.c
parent0ee3ad44f2514289feb3d7079ff0afc3d7e79802 (diff)
make sure that events sent after TERMINATE are propagated to plugins
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/main.c b/main.c
index b1a5cd8c..d5a7b83d 100644
--- a/main.c
+++ b/main.c
@@ -531,14 +531,14 @@ player_mainloop (void) {
uint32_t p2;
int term = 0;
while (messagepump_pop(&msg, &ctx, &p1, &p2) != -1) {
- if (!term) { // when term is set to 1 -- it means we can't handle events, but we still need to process them to avoid memleaks
- // broadcast to all plugins
- DB_plugin_t **plugs = plug_get_list ();
- for (int n = 0; plugs[n]; n++) {
- if (plugs[n]->message) {
- plugs[n]->message (msg, ctx, p1, p2);
- }
+ // broadcast to all plugins
+ DB_plugin_t **plugs = plug_get_list ();
+ for (int n = 0; plugs[n]; n++) {
+ if (plugs[n]->message) {
+ plugs[n]->message (msg, ctx, p1, p2);
}
+ }
+ if (!term) {
DB_output_t *output = plug_get_output ();
switch (msg) {
case DB_EV_REINIT_SOUND: