Skip to content

Commit

Permalink
Don't load NoteData twice in NoteFieldPreview in loaded during init
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jan 26, 2021
1 parent 77abb15 commit f2c5bfc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Etterna/Actor/Gameplay/NoteFieldPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ NoteFieldPreview::LoadFromNode(const XNode* pNode)
p_dummyNoteData->SetNumTracks(style->m_iColsPerPlayer);

Init(m_pPlayerState, noteFieldHeight);
LoadDummyNoteData();

// If NoteData was loaded in InitCommand, this isn't necessary
// It would be null if not loaded in InitCommand
if (m_pNoteData == nullptr)
Load(p_dummyNoteData,
m_iDrawDistanceAfterTargetsPixels,
m_iDrawDistanceBeforeTargetsPixels);
}

void
Expand Down

0 comments on commit f2c5bfc

Please sign in to comment.