mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Don't call love.graphics functions in love.run until a window has been created, prevents segfaults when love.window and love.graphics were loaded, but there was no window
This commit is contained in:
@@ -494,7 +494,7 @@ function love.run()
|
||||
-- Call update and draw
|
||||
if love.update then love.update(dt) end -- will pass 0 if love.timer is disabled
|
||||
|
||||
if love.window and love.graphics then
|
||||
if love.window and love.graphics and love.window.isCreated() then
|
||||
love.graphics.clear()
|
||||
love.graphics.origin()
|
||||
if love.draw then love.draw() end
|
||||
|
||||
Reference in New Issue
Block a user