runuifun: Only call the function once
This commit is contained in:
parent
82440c44bb
commit
01c6855072
1 changed files with 3 additions and 4 deletions
|
@ -143,6 +143,7 @@ namespace
|
|||
main_window->notify_exit();
|
||||
} else if(c == UISERV_UIFUN) {
|
||||
std::list<ui_queue_entry>::iterator i;
|
||||
ui_queue_entry e;
|
||||
queue_synchronous_fn_warning = true;
|
||||
back:
|
||||
{
|
||||
|
@ -150,12 +151,10 @@ back:
|
|||
if(ui_queue.empty())
|
||||
goto end;
|
||||
i = ui_queue.begin();
|
||||
}
|
||||
i->fn(i->arg);
|
||||
{
|
||||
mutex::holder h(*ui_mutex);
|
||||
e = *i;
|
||||
ui_queue.erase(i);
|
||||
}
|
||||
e.fn(e.arg);
|
||||
goto back;
|
||||
end:
|
||||
queue_synchronous_fn_warning = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue