Skip to content

Commit 9a3ee9a

Browse files
committed
Workbench.KillProcess() is no longer called from DiscordRP on script restart if rich presence is disabled
1 parent d8a24d0 commit 9a3ee9a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/WorkbenchGame/DiscordRP/DiscordRP.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ class DiscordRP: WorkbenchPlugin
154154

155155
void ~DiscordRP()
156156
{
157+
if (!DISCORD_RICH_PRESENCE_ENABLED)
158+
{
159+
return;
160+
}
157161
Workbench.KillProcess(DISCORD_RICH_PRESENCE_HANDLE);
158162
DISCORD_RICH_PRESENCE_RUNNING = false;
159163
}

0 commit comments

Comments
 (0)