From: Tomas Wenström Date: Sat, 6 Feb 2021 16:02:53 +0000 (+0100) Subject: Bugfix - don't return unless Some X-Git-Url: http://www.dolda2000.com/gitweb/?p=kaka%2Frust-sdl-test.git;a=commitdiff_plain;h=40c949e573ea85720e1fa9972a1e16f5f1216799 Bugfix - don't return unless Some --- diff --git a/src/core/app.rs b/src/core/app.rs index 18be50c..d440eb3 100644 --- a/src/core/app.rs +++ b/src/core/app.rs @@ -248,7 +248,9 @@ impl App { } _ => { if let Some(state) = self.states.last_mut() { - return state.handle_event(event) + if let Some(change) = state.handle_event(event) { + return Some(change); + } } else { return Some(StateChange::Exit) }