OpenGL context issue on window recreation


#1

Here is my issue(stripped down version), in newOpenGLContextCreated in my Component, if I do this…

{
	jassert(getCurrentContext()->isActive());
}

The first time the window is created(and therefore the context) everything is fine… but if I then minimize the window and then maximize it, I assert…

Unfortunately this doesn’t seem to happen with the JUCE demo! Can you think of any circumstance where the context wouldn’t be valid?

(GIT version from last Thursday), I don’t if its a new problem, or just one I haven’t noticed before…

Here is my backtrace when the window is maximized

	SMTest::newOpenGLContextCreated()  Line 98 + 0x43 bytes	C++
 	juce::OpenGLComponent::makeCurrentContextActive()  Line 11048 + 0x12 bytes	C++
 	juce::OpenGLComponent::renderAndSwapBuffers()  Line 11092 + 0x8 bytes	C++
 	juce::OpenGLComponent::paint(juce::Graphics & __formal={...})  Line 11076 + 0x12 bytes	C++
 	juce::Component::renderComponent(juce::Graphics & g={...})  Line 41469 + 0x13 bytes	C++
 	juce::Component::paintEntireComponent(juce::Graphics & g={...}, bool ignoreAlphaLevel=false)  Line 41554	C++
 	juce::Component::renderComponent(juce::Graphics & g={...})  Line 41500	C++
 	juce::Component::paintEntireComponent(juce::Graphics & g={...}, bool ignoreAlphaLevel=false)  Line 41554	C++
 	juce::Component::renderComponent(juce::Graphics & g={...})  Line 41500	C++
 	juce::Component::paintEntireComponent(juce::Graphics & g={...}, bool ignoreAlphaLevel=true)  Line 41554	C++
 	juce::ComponentPeer::handlePaint(juce::LowLevelGraphicsContext & contextToPaintTo={...})  Line 12246	C++

#2

Never mind I think I know… I may be destroying the context myself!