Page 1 of 1

Better error catching for core.display.newFont

Posted: Sat May 05, 2012 5:25 am
by yufra
The sdl_new_font function in core_lua.c attempts to load a font from the provided path, but there is no check that I can see for if the file actually exists. This caused me a lot of head scratching earlier today when I was referencing a non-existing font file (and directory) that resulted in segmentation faults. Should we check for the file's existence and throw a Lua error if it does not?

Re: Better error catching for core.display.newFont

Posted: Sun May 06, 2012 2:22 pm
by darkgod
done