Skip to content

Commit

Permalink
Revert "Solve JUCE_CHECK_OPENGL_ERROR false positives when closing pl…
Browse files Browse the repository at this point in the history
…ug-in windows"

This reverts commit 7d371d7.

The bug was eventually solved differently in the official juce branch and this is no longer needed.
See juce-framework#88
  • Loading branch information
yairchu committed Aug 11, 2016
1 parent f97d7ac commit ec54f21
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions modules/juce_opengl/juce_opengl.cpp
Expand Up @@ -149,29 +149,6 @@ static void checkGLError (const char* file, const int line)
if (e == GL_NO_ERROR)
break;

// The GL error could be due to the window being closed in the main thread.
// Check whether this is the case and only if it isn't trigger an assertion failure.
OpenGLContext* currentContext = OpenGLContext::getCurrentContext();
jassert (currentContext != nullptr);
Component* component = currentContext->getTargetComponent();
if (component == nullptr)
break;
ComponentPeer* peer = component->getPeer();
if (peer == nullptr)
break;
#if JUCE_MAC
NSView* nsView = (NSView*) peer->getNativeHandle();
if (nsView == nullptr)
break;
NSWindow* nsWindow = [nsView window];
if (nsWindow == nullptr)
break;
if (! [nsWindow isVisible])
break;
if ([nsWindow hidesOnDeactivate] && ! [NSApp isActive])
break;
#endif

DBG ("***** " << getGLErrorMessage (e) << " at " << file << " : " << line);
jassertfalse;
}
Expand Down

0 comments on commit ec54f21

Please sign in to comment.