aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-04-14 14:40:02 -0700
committer1029chris <1029chris@gmail.com>2016-04-14 14:40:02 -0700
commit6d54f2c8edbef92f04c55a7a281eb4f2713098c6 (patch)
tree6cea8a29e347a7c4a9883e38f563487fbc01b8cd /main.lua
parent48684ad8ada148db99828f3991a8d79e51abeef3 (diff)
Fixed crash after messages ran out
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index 956b5ef..ea6b409 100644
--- a/main.lua
+++ b/main.lua
@@ -79,8 +79,10 @@ function love.mousereleased(x, y, button)
for i=1,6 do
icon[i].cl = false
end
- if string.len(v1.msgs[v1.c.chat.msgs]) == string.len(v1.c.chat.msg) and v1.yes == true then
- v1.c.chat.next = false
+ if v1.msgs[v1.c.chat.msgs] ~= nil then
+ if string.len(v1.msgs[v1.c.chat.msgs]) == string.len(v1.c.chat.msg) and v1.yes == true then
+ v1.c.chat.next = false
+ end
end
end
function love.draw()