-
-
Save binary1248/60a19e632b29b306a29b to your computer and use it in GitHub Desktop.
Patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/SFML/Graphics/Text.cpp b/src/SFML/Graphics/Text.cpp | |
index a28c404..aaec889 100644 | |
--- a/src/SFML/Graphics/Text.cpp | |
+++ b/src/SFML/Graphics/Text.cpp | |
@@ -28,7 +28,6 @@ | |
#include <SFML/Graphics/Text.hpp> | |
#include <SFML/Graphics/Texture.hpp> | |
#include <SFML/Graphics/RenderTarget.hpp> | |
-#include <cassert> | |
namespace sf | |
diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp | |
index f76f6c5..7ecc524 100644 | |
--- a/src/SFML/Window/GlContext.cpp | |
+++ b/src/SFML/Window/GlContext.cpp | |
@@ -32,7 +32,6 @@ | |
#include <SFML/OpenGL.hpp> | |
#include <set> | |
#include <cstdlib> | |
-#include <cassert> | |
#ifdef SFML_SYSTEM_IOS | |
#include <OpenGLES/ES1/gl.h> | |
#else | |
diff --git a/src/SFML/Window/GlResource.cpp b/src/SFML/Window/GlResource.cpp | |
index ffffce6..affbc60 100644 | |
--- a/src/SFML/Window/GlResource.cpp | |
+++ b/src/SFML/Window/GlResource.cpp | |
@@ -29,6 +29,7 @@ | |
#include <SFML/Window/GlContext.hpp> | |
#include <SFML/System/Mutex.hpp> | |
#include <SFML/System/Lock.hpp> | |
+#include <cassert> | |
namespace | |
@@ -79,6 +80,9 @@ GlResource::~GlResource() | |
//////////////////////////////////////////////////////////// | |
void GlResource::ensureGlContext() | |
{ | |
+ // Make sure the shared context exists before creating an internal context | |
+ assert((Lock(mutex), count)); | |
+ | |
priv::GlContext::ensureContext(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment