From 1d5ae827df23c0722228abc2da28968f7edaba3c Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Sat, 3 Sep 2022 17:58:40 -0700 Subject: [PATCH] Fixes segmentation fault --- plugins/spectate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/spectate.cpp b/plugins/spectate.cpp index 14dd2e833..86ba199f8 100644 --- a/plugins/spectate.cpp +++ b/plugins/spectate.cpp @@ -344,7 +344,7 @@ void onJobCompletion(color_ostream &out, void* job_ptr) { // the job doesn't exist, so we definitely need to get rid of that job_tracker.erase(job->id); // the event manager clones jobs and returns those clones for completed jobs. So the pointers won't match without a refactor of EM passing clones to both events - if (job_watched->id == job->id) { + if (job_watched && job_watched->id == job->id) { job_watched = nullptr; } }