This is just a small side effect of my work trying to port to SDL2. I noticed a segfault when trying to run from a directory that didn't have the full set of support files. Anyhow, it was simply due to a return code not being checked. The attached patch turns the segfault into a clean exit with an error.
The patch was produced with git but should apply cleanly at svn revision 6423.
Printing to stderr will not show the message on windows ... Thanks
Should I use dbg->error() instead? What's preferred? I see a variety of ways of printing error messages in the source code.
The dbg subsystem may not be initialized such early on. I need to check this.
I was going to go check this out further, but it seems this was accepted as r6427, thanks. :-)
(Fwiw, I do see that simgraph_init is for sure preceded by logging setup. No idea what happens on Windows w.r.t. printing to stderr, though.)
Quote from: ArthurDenture on April 06, 2013, 01:59:07 PM
(Fwiw, I do see that simgraph_init is for sure preceded by logging setup. No idea what happens on Windows w.r.t. printing to stderr, though.)
I think it's pretty much the same as with
simutrans 2> /dev/null on *nix.