diff --git a/src/frontend/glium/glutinloop.rs b/src/frontend/glium/glutinloop.rs index 06e112b2e..7f51f6776 100644 --- a/src/frontend/glium/glutinloop.rs +++ b/src/frontend/glium/glutinloop.rs @@ -327,8 +327,12 @@ impl GuiEventLoop { } } + fn pop_gui_thread_send(&self) -> Option { + self.gui_thread_sends.borrow_mut().pop_front() + } + fn process_gui_exec(&self) -> Result<(), Error> { - while let Some(func) = self.gui_thread_sends.borrow_mut().pop_front() { + while let Some(func) = self.pop_gui_thread_send() { func(); }