Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly prevent writing to saves if filesystem is not init
Another cause of #870 is d0ffafe, as a bisect tells me. What that commit did is remove screenbuffer as a pointer, since it's a statically-allocated object that _should_ always exist, and it removed the `screenbuffer == NULL` guards in savestats() and savesettings(). Unfortunately, those guards did something very important - namely, they prevented writing to the save files when the filesystem wasn't initialized. But that wasn't made clear, because it seemed like the point of those guards was to prevent dereferencing NULL. So instead, explicitly make it clear that FILESYSTEM_saveTiXml2Document() needs to fail if the filesystem isn't initialized. I've done this by adding an isInit bool to FileSystemUtils.cpp.
- Loading branch information