fix: add forgotten nullcheck
This commit is contained in:
parent
538b9bd093
commit
fe467119d2
1 changed files with 6 additions and 2 deletions
|
@ -104,12 +104,16 @@ end
|
||||||
-- Add send keys functions to the scene
|
-- Add send keys functions to the scene
|
||||||
|
|
||||||
function SceneManager:keypressed( key, scancode, isrepeat )
|
function SceneManager:keypressed( key, scancode, isrepeat )
|
||||||
|
if (self.currentScene ~= nil) then
|
||||||
self.currentScene:keypressed( key, scancode, isrepeat )
|
self.currentScene:keypressed( key, scancode, isrepeat )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function SceneManager:keyreleased( key )
|
function SceneManager:keyreleased( key )
|
||||||
|
if (self.currentScene ~= nil) then
|
||||||
self.currentScene:keyreleased( key )
|
self.currentScene:keyreleased( key )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- DRAW FUNCTIONS
|
-- DRAW FUNCTIONS
|
||||||
-- Draw the current scene
|
-- Draw the current scene
|
||||||
|
|
Loading…
Reference in a new issue