Skip to content

Commit

Permalink
fix the permamirror crashing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 25, 2017
1 parent 3d0a90e commit 87706ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2629,9 +2629,13 @@ class LunaProfile : public Luna<Profile>

static int IsCurrentChartPermamirror(T* p, lua_State *L) {
bool o = false;
const string& ck = GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey();
if (p->PermaMirrorCharts.count(ck))
o = true;

if (GAMESTATE->m_pCurSteps[PLAYER_1]) {
const string& ck = GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey();

if (p->PermaMirrorCharts.count(ck))
o = true;
}

lua_pushboolean(L, o);
return 1;
Expand Down

0 comments on commit 87706ab

Please sign in to comment.