Skip to content

Conversation

@satoshinm
Copy link
Contributor

When craft cannot load shader or texture files (for example, if launched outside of its resource directory), it would crash with a segmentation fault:

native-build $ ./craft 
error 78: failed to open file for reading
Segmentation fault: 11

This PR fixes this crash by exiting with an error, as well as printing the file which failed to load:

native-build $ ./craft
load_png_texture textures/texture.png failed, error 78: failed to open file for reading

@fogleman fogleman merged commit ec9fc97 into fogleman:master Apr 6, 2017
@fogleman
Copy link
Owner

fogleman commented Apr 6, 2017

Thank you, I appreciate small PRs!

@satoshinm satoshinm deleted the filefail branch April 7, 2017 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants