Skip to content

Commit

Permalink
Don't use emscripten.async_call while already in async mode
Browse files Browse the repository at this point in the history
This particular use case appears to be safe, but I could make Ren'Py crash with more complex async_call-s.
This may also explain some irregular crashes a while ago when letting RenPyWeb run unattended.
This is somewhat similar to running Python in two threads. In doubt, let's avoid.
Moreover, however autosave is run, the browser will freeze a bit, no significant change.
  • Loading branch information
Beuc committed Oct 24, 2019
1 parent 6691bb0 commit c1b077f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions renpy/loadsave.py
Expand Up @@ -570,8 +570,7 @@ def force_autosave(take_screenshot=False, block=False):
autosave_thread.daemon = True
autosave_thread.start()
else:
import emscripten
emscripten.async_call(autosave_thread_function, take_screenshot, -1)
autosave_thread_function(take_screenshot)


################################################################################
Expand Down

0 comments on commit c1b077f

Please sign in to comment.