@@ -1432,9 +1432,12 @@ XNode* Profile::SavePermaMirrorCreateNode() const {
1432
1432
1433
1433
XNode* GoalsForChart::CreateNode () const {
1434
1434
XNode* cg = new XNode (" GoalsForChart" );
1435
- cg->AppendAttr (" Key" , goals[0 ].chartkey );
1436
- FOREACH_CONST (ScoreGoal, goals, sg)
1437
- cg->AppendChild (sg->CreateNode ());
1435
+
1436
+ if (!goals.empty ()) {
1437
+ cg->AppendAttr (" Key" , goals[0 ].chartkey );
1438
+ FOREACH_CONST (ScoreGoal, goals, sg)
1439
+ cg->AppendChild (sg->CreateNode ());
1440
+ }
1438
1441
return cg;
1439
1442
}
1440
1443
@@ -2123,7 +2126,7 @@ void Profile::ImportScoresToEtterna() {
2123
2126
}
2124
2127
2125
2128
XNode* Profile::SaveEttScoresCreateNode () const {
2126
- CHECKPOINT_M (" Getting the node to save song scores." );
2129
+ CHECKPOINT_M (" Saving the player scores node ." );
2127
2130
2128
2131
const Profile* pProfile = this ;
2129
2132
ASSERT (pProfile != NULL );
@@ -2132,7 +2135,7 @@ XNode* Profile::SaveEttScoresCreateNode() const {
2132
2135
}
2133
2136
2134
2137
void Profile::LoadEttScoresFromNode (const XNode* pSongScores) {
2135
- CHECKPOINT_M (" Loading the node that contains song scores." );
2138
+ CHECKPOINT_M (" Loading the player scores node ." );
2136
2139
SCOREMAN->LoadFromNode (pSongScores);
2137
2140
}
2138
2141
@@ -2621,7 +2624,7 @@ class LunaProfile : public Luna<Profile>
2621
2624
static int IsCurrentChartPermamirror (T* p, lua_State *L) {
2622
2625
bool o = false ;
2623
2626
const string& ck = GAMESTATE->m_pCurSteps [PLAYER_1]->GetChartKey ();
2624
- if (p->PermaMirrorCharts .count (ck));
2627
+ if (p->PermaMirrorCharts .count (ck))
2625
2628
o = true ;
2626
2629
2627
2630
lua_pushboolean (L, o);
0 commit comments