From 23b513cf32c736fa4a3ece38ee2b025965ed64bb Mon Sep 17 00:00:00 2001 From: MinaciousGrace Date: Sat, 10 Jun 2017 03:12:45 -0400 Subject: [PATCH] initialize a dumy profile during profilemanager init and return it if no other profiles have been loaded yet --- src/ProfileManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index 3882e82ec3..cff62490be 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -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 @@ -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 )