summaryrefslogtreecommitdiffstats
path: root/src/mixer/playerinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixer/playerinfo.cpp')
-rw-r--r--src/mixer/playerinfo.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mixer/playerinfo.cpp b/src/mixer/playerinfo.cpp
index 2a9c98e206..47771586fc 100644
--- a/src/mixer/playerinfo.cpp
+++ b/src/mixer/playerinfo.cpp
@@ -42,9 +42,17 @@ PlayerInfo::~PlayerInfo() {
clearControlCache();
}
+PlayerInfo& PlayerInfo::create() {
+ VERIFY_OR_DEBUG_ASSERT(!s_pPlayerInfo) {
+ return *s_pPlayerInfo;
+ }
+ s_pPlayerInfo = new PlayerInfo();
+ return *s_pPlayerInfo;
+}
+
// static
PlayerInfo& PlayerInfo::instance() {
- if (!s_pPlayerInfo) {
+ VERIFY_OR_DEBUG_ASSERT(s_pPlayerInfo) {
s_pPlayerInfo = new PlayerInfo();
}
return *s_pPlayerInfo;