From 22566a52cf7bb6e970e0a2042c7341ab66b2c4e0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 16 Jun 2005 03:18:13 +0000 Subject: [PATCH] update --- stepmania/src/ScreenGameplay.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 7c60328aaf..57805142a1 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2188,10 +2188,12 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) int iPlaySongIndex = GAMESTATE->GetCourseSongIndex()+1; iPlaySongIndex %= m_apSongsQueue.size(); - m_apSongsQueue[iPlaySongIndex]->PushSelf( LUA->L ); - GAMESTATE->m_Environment->Set( "NextSong" ); + Lua *L = LUA->Get(); + m_apSongsQueue[iPlaySongIndex]->PushSelf( L ); + GAMESTATE->m_Environment->Set( L, "NextSong" ); MESSAGEMAN->Broadcast( "NextCourseSong" ); - GAMESTATE->m_Environment->Unset( "NextSong" ); + GAMESTATE->m_Environment->Unset( L, "NextSong" ); + LUA->Release( L ); m_NextSong.PlayCommand( "Start" ); m_NextSong.Reset(); m_NextSong.StartTransitioning( SM_LoadNextSong );