Skip to content

Commit

Permalink
fix: don't crash unsupported game
Browse files Browse the repository at this point in the history
still won't *work*, just won't crash (tm)
  • Loading branch information
ThisAMJ committed Sep 9, 2024
1 parent 6a32ad5 commit 2d70454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void Cheats::Init() {
void Cheats::Shutdown() {
if (cvars) cvars->Lock();

if (sar.game->Is(SourceGame_PortalStoriesMel)) {
if (sar.game && sar.game->Is(SourceGame_PortalStoriesMel)) {
Variable("give_portalgun").AddFlag(FCVAR_CHEAT);
Variable("setmodel").AddFlag(FCVAR_CHEAT);
Variable("upgrade_portalgun").AddFlag(FCVAR_CHEAT);
Expand Down

0 comments on commit 2d70454

Please sign in to comment.