Skip to content

Commit

Permalink
initialize a dumy profile during profilemanager init and return it if…
Browse files Browse the repository at this point in the history
… no other profiles have been loaded yet
  • Loading branch information
MinaciousGrace committed Jun 10, 2017
1 parent bb017e4 commit 23b513c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ProfileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ void ProfileManager::Init(LoadingWindow* ld)

if (!g_vLocalProfile.empty())
m_sProfileDir[PLAYER_1] = g_vLocalProfile[0].sDir;

dummy = new Profile;
}

bool ProfileManager::FixedProfiles() const
Expand Down Expand Up @@ -373,7 +375,7 @@ const Profile *ProfileManager::GetLocalProfile( const RString &sProfileID ) cons
return &dap->profile;
}

return NULL;
return dummy;
}

bool ProfileManager::CreateLocalProfile( const RString &sName, RString &sProfileIDOut )
Expand Down

0 comments on commit 23b513c

Please sign in to comment.