From ad79328a705ad9b15232540be5d575365a7c29fa Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 15 Apr 2011 18:14:35 +0200 Subject: [PATCH] Fixed recursive mutex lock in GlContext::Cleanup() --- src/SFML/Window/GlContext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 40252b493..3c5b4ef9a 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -182,8 +182,9 @@ GlContext* GlContext::New(const ContextSettings& settings, unsigned int width, u //////////////////////////////////////////////////////////// GlContext::~GlContext() { - // Deactivate the context before killing it - SetActive(false); + // Deactivate the context before killing it, unless we're inside Cleanup() + if (sharedContext) + SetActive(false); }