Fix a crash related to love.graphics.push and love.window.setMode.

This commit is contained in:
Alex Szpakowski
2017-01-21 12:03:43 -04:00
parent 01ff7d1275
commit f45c6a0d74
+3 -4
View File
@@ -63,6 +63,9 @@ Graphics::Graphics()
states.reserve(10);
states.push_back(DisplayState());
pixelSizeStack.reserve(5);
pixelSizeStack.push_back(1);
if (currentWindow.get())
{
int w, h;
@@ -313,10 +316,6 @@ bool Graphics::setMode(int width, int height)
// Restore the graphics state.
restoreState(states.back());
pixelSizeStack.clear();
pixelSizeStack.reserve(5);
pixelSizeStack.push_back(1);
int gammacorrect = isGammaCorrect() ? 1 : 0;
// We always need a default shader.