From 08c00bd689790d3d5a42e938f40360ed019351d2 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 25 Apr 2004 23:17:08 +0000 Subject: [PATCH] fix backing out of the stage screen causes the stage counter to be increased --- stepmania/src/ScreenGameplay.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 56c885ce23..464a5697de 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -768,6 +768,14 @@ void ScreenGameplay::Init() ScreenGameplay::~ScreenGameplay() { + if( this->IsFirstUpdate() ) + { + /* We never received any updates. That means we were deleted without being + * used, and never actually played. (This can happen when backing out of + * ScreenStage.) Cancel the stage. */ + GAMESTATE->CancelStage(); + } + LOG->Trace( "ScreenGameplay::~ScreenGameplay()" ); for( int p=0; p