XProger / OpenLara

Classic Tomb Raider open-source engine
http://xproger.info/projects/OpenLara/
BSD 2-Clause "Simplified" License
4.63k stars 360 forks source link

Fix segfault on Linux when files aren't found #467

Closed cookie99999 closed 1 year ago

cookie99999 commented 1 year ago

When the game is started with missing data files on Linux, osFixFileName will return a null pointer, which gets dereferenced in Stream::openFile, which causes a segfault, and no helpful error message is printed. With this commit the game will instead exit cleanly so the user can read the file error in the log.

XProger commented 1 year ago

thanks