From c2e8e70cf7559086af716c9d667c4fa51eb498cc Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 2 Jul 2006 06:03:48 +0000 Subject: [PATCH] fix null deref if song set and steps not set in GetCurrentCreditsText --- stepmania/src/GameState.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 1d3f093b5e..bfe6f68c60 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1984,6 +1984,8 @@ public: FOREACH_HumanPlayer( p ) { const Steps* pSteps = GAMESTATE->m_pCurSteps[p]; + if( pSteps == NULL ) + return 0; bool bAlreadyAdded = find( vpStepsToShow.begin(), vpStepsToShow.end(), pSteps ) != vpStepsToShow.end(); if( !bAlreadyAdded ) vpStepsToShow.push_back( pSteps );