Skip to content

Commit 844e0cd

Browse files
committed
Fixed changing cvar would crash the game
1 parent 68a17d5 commit 844e0cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/core.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ void Core::Initialize(GarrysMod::Lua::ILuaInterface* LUA) {
280280

281281
cvar = InterfacePointers::Cvar();
282282
if (cvar == nullptr) throw std::runtime_error("failed to get ICvar interface");
283+
284+
g_pCVar = cvar;
283285
for (ConVar* convar : moonloader_convars)
284286
cvar->RegisterConCommand(convar);
285287

0 commit comments

Comments
 (0)