From 0c9665ae4d09b6151d2ac6c7ee7d0dd40edc5a2b Mon Sep 17 00:00:00 2001 From: mshirt Date: Fri, 29 Dec 2017 15:15:01 -0800 Subject: [PATCH] bugfix rare bug where closing the game when spawning a footprint or footsplash would crash the game, both on exiting and then reloading. --- scripts/Scene_Map.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/Scene_Map.rb b/scripts/Scene_Map.rb index aaf4078..99dbf76 100644 --- a/scripts/Scene_Map.rb +++ b/scripts/Scene_Map.rb @@ -502,16 +502,24 @@ class Scene_Map # * Misc operations #-------------------------------------------------------------------------- def new_footprint(direction, x, y) - @spriteset.new_footprint(direction, x, y) + if @spriteset != nil + @spriteset.new_footprint(direction, x, y) + end end def new_footsplash(direction, x, y) - @spriteset.new_footsplash(direction, x, y) + if @spriteset != nil + @spriteset.new_footsplash(direction, x, y) + end end def new_maptext(text, x, y) - @spriteset.new_maptext(text, x, y) + if @spriteset != nil + @spriteset.new_maptext(text, x, y) + end end def fix_footsplashes(xDelt, yDelt) - @spriteset.fix_footsplashes(xDelt, yDelt) + if @spriteset != nil + @spriteset.fix_footsplashes(xDelt, yDelt) + end end def menu_open? @menu.visible || @item_menu.visible