From 7ab5cb20c8235d3a6ba500eaf19d9221ac665266 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Fri, 28 Oct 2016 17:49:21 +0100 Subject: [PATCH] gsdx: Don't close threads twice CloseThread is called in the GSJobQueue destructor, so don't call it again in the GSThread destructor. Fixes #392, which was caused by a use after free. Also prevents pthread_join() from being called twice for each thread on non-Windows operating systems, which is undefined behaviour. --- plugins/GSdx/GSThread.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/GSdx/GSThread.cpp b/plugins/GSdx/GSThread.cpp index 860b7384f2..4e47cd8ffe 100644 --- a/plugins/GSdx/GSThread.cpp +++ b/plugins/GSdx/GSThread.cpp @@ -36,7 +36,6 @@ GSThread::GSThread() GSThread::~GSThread() { - CloseThread(); } #ifdef _WIN32