fix crash if song has no note data
This commit is contained in:
@@ -73,9 +73,16 @@ void Notes::GetNoteData( NoteData* pNoteDataOut ) const
|
|||||||
{
|
{
|
||||||
ASSERT(this);
|
ASSERT(this);
|
||||||
ASSERT(pNoteDataOut);
|
ASSERT(pNoteDataOut);
|
||||||
|
|
||||||
Decompress();
|
Decompress();
|
||||||
pNoteDataOut->SetNumTracks( notes->GetNumTracks() );
|
|
||||||
*pNoteDataOut = *notes;
|
if( notes != NULL )
|
||||||
|
*pNoteDataOut = *notes;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pNoteDataOut->ClearAll();
|
||||||
|
pNoteDataOut->SetNumTracks( GameManager::NotesTypeToNumTracks(m_NotesType) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notes::SetSMNoteData( const CString &out )
|
void Notes::SetSMNoteData( const CString &out )
|
||||||
|
|||||||
Reference in New Issue
Block a user