Better error catching for core.display.newFont

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Better error catching for core.display.newFont

#1 Post 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?
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Better error catching for core.display.newFont

#2 Post by darkgod »

done
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply