catch null font, report it as unimplemented
This commit is contained in:
parent
6d58e964bc
commit
2f629433aa
@ -289,6 +289,11 @@ void text_cache_reset_arena(TextCache *cache) {
|
|||||||
|
|
||||||
|
|
||||||
void draw_text(const char *string, Vec2 position, float height, Color color, const char *font) {
|
void draw_text(const char *string, Vec2 position, float height, Color color, const char *font) {
|
||||||
|
if (!font) {
|
||||||
|
log_warn("Default font isn't yet implemented");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ensure_font_cache(font, (int)height);
|
ensure_font_cache(font, (int)height);
|
||||||
|
|
||||||
/* the original string might not be around by the time it's used, so copy it */
|
/* the original string might not be around by the time it's used, so copy it */
|
||||||
|
Loading…
Reference in New Issue
Block a user