diff --git a/src/main/services/download/real-debrid-downloader.ts b/src/main/services/download/real-debrid-downloader.ts index fc32263c..f61cb1ff 100644 --- a/src/main/services/download/real-debrid-downloader.ts +++ b/src/main/services/download/real-debrid-downloader.ts @@ -122,9 +122,11 @@ export class RealDebridDownloader { } static async pauseDownload() { - const gid = this.downloads.get(this.downloadingGame!.id!); - if (gid) { - await HTTPDownload.pauseDownload(gid); + if (this.downloadingGame) { + const gid = this.downloads.get(this.downloadingGame.id); + if (gid) { + await HTTPDownload.pauseDownload(gid); + } } this.realDebridTorrentId = null;