Skip to content

Commit

Permalink
Fixed changing cvar would crash the game
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmolot committed Jul 5, 2024
1 parent 68a17d5 commit 844e0cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ void Core::Initialize(GarrysMod::Lua::ILuaInterface* LUA) {

cvar = InterfacePointers::Cvar();
if (cvar == nullptr) throw std::runtime_error("failed to get ICvar interface");

g_pCVar = cvar;
for (ConVar* convar : moonloader_convars)
cvar->RegisterConCommand(convar);

Expand Down

0 comments on commit 844e0cd

Please sign in to comment.