Fix love.window.setMode crashing if a Canvas is active.

This commit is contained in:
Alex Szpakowski
2016-03-22 18:05:26 -03:00
parent ea2aadf888
commit 090c50795a
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -521,7 +521,8 @@ void Canvas::stopGrab(bool switchingToOtherCanvas)
// Make sure the canvas texture is up to date if we're using MSAA.
resolveMSAA(false);
gl.matrices.projection.pop_back();
if (gl.matrices.projection.size() > 1)
gl.matrices.projection.pop_back();
if (!switchingToOtherCanvas)
{
+2 -2
View File
@@ -252,8 +252,6 @@ bool Graphics::setMode(int width, int height)
created = true;
setViewportSize(width, height);
// Enable blending
glEnable(GL_BLEND);
@@ -310,6 +308,8 @@ bool Graphics::setMode(int width, int height)
if (quadIndices == nullptr)
quadIndices = new QuadIndices(20);
setViewportSize(width, height);
// Restore the graphics state.
restoreState(states.back());