about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-29 17:36:56 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-29 17:36:56 -0700
commit9410cccb083151d322fdad5ba6273e05c3165c32 (patch)
tree637f59d37621ddc8fe30003ba1f169241e88a14d
parentfeba7bf3c2c32189c40920ec5c5cfed8b35eb4fe (diff)
downloadlines.love-9410cccb083151d322fdad5ba6273e05c3165c32.tar.gz
avoid redundant writes on exit
-rw-r--r--main.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 22ef6e7..63c0e8d 100644
--- a/main.lua
+++ b/main.lua
@@ -323,7 +323,9 @@ end
 
 -- make sure to save before quitting
 function love.quit()
-  save_to_disk(Lines, Filename)
+  if Next_save then
+    save_to_disk(Lines, Filename)
+  end
 end
 
 function App.mousepressed(x,y, mouse_button)