Can confirm this small code change works!
For anyone finding this post and needing this fix but doesn't know how to modify the code themselves, I'm attaching the file I modified where I put in the above code to prevent crashing. No other changes were made.
I'm not sure about the etiquette of posting modified files of mods other people made, but I figure since it's been quite a while since this fix has been known but not implemented, it'd help others to have it here instead of digging around in RPG Maker.
Map425.rxdata