fix deref null Steps
This commit is contained in:
@@ -362,7 +362,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Steps *pSteps = GetSelectedSong()->GetStepsByDifficulty( GetSelectedStepsType(), dc );
|
Steps *pSteps = GetSelectedSong()->GetStepsByDifficulty( GetSelectedStepsType(), dc );
|
||||||
if( UNLOCKMAN->StepsIsLocked( GetSelectedSong(), pSteps ) )
|
if( pSteps && UNLOCKMAN->StepsIsLocked( GetSelectedSong(), pSteps ) )
|
||||||
pSteps = NULL;
|
pSteps = NULL;
|
||||||
|
|
||||||
switch( EDIT_MODE.GetValue() )
|
switch( EDIT_MODE.GetValue() )
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ const UnlockEntry *UnlockManager::FindSong( const Song *pSong ) const
|
|||||||
|
|
||||||
const UnlockEntry *UnlockManager::FindSteps( const Song *pSong, const Steps *pSteps ) const
|
const UnlockEntry *UnlockManager::FindSteps( const Song *pSong, const Steps *pSteps ) const
|
||||||
{
|
{
|
||||||
|
ASSERT( pSong && pSteps );
|
||||||
FOREACH_CONST( UnlockEntry, m_UnlockEntries, e )
|
FOREACH_CONST( UnlockEntry, m_UnlockEntries, e )
|
||||||
if( e->m_pSong == pSong && e->m_dc == pSteps->GetDifficulty() )
|
if( e->m_pSong == pSong && e->m_dc == pSteps->GetDifficulty() )
|
||||||
return &(*e);
|
return &(*e);
|
||||||
|
|||||||
Reference in New Issue
Block a user