X-Git-Url: https://git.octo.it/?p=supertux.git;a=blobdiff_plain;f=src%2Fsupertux%2Fscreen_manager.cpp;h=e1c3376f5556c92f48339b4d4ba141f7d6c5c406;hp=decc603e39b7a810acdb1e0d35b8f04752503566;hb=590805b8b24971ca43f777abfbf79fce21792804;hpb=c0e497c19521c1868f44c0fd21bbf666a66654be diff --git a/src/supertux/screen_manager.cpp b/src/supertux/screen_manager.cpp index decc603e3..e1c3376f5 100644 --- a/src/supertux/screen_manager.cpp +++ b/src/supertux/screen_manager.cpp @@ -216,7 +216,9 @@ ScreenManager::process_events() break; case SDL_WINDOWEVENT_FOCUS_LOST: - if(GameSession::current() != NULL) { + if(GameSession::current() != NULL && + GameSession::current()->is_active()) + { GameSession::current()->toggle_pause(); } break;