Fixed a crashing issue when the error handler can’t create a window

This commit is contained in:
Alex Szpakowski
2013-12-04 17:03:34 -04:00
parent 33bb049ee6
commit f997cc43c1
2 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -1520,7 +1520,8 @@ function love.errhand(msg)
end
if not love.graphics.isCreated() or not love.window.isCreated() then
if not pcall(love.window.setMode, 800, 600) then
local success, status = pcall(love.window.setMode, 800, 600)
if not success or not status then
return
end
end