diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-04-10 18:51:47 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-04-10 18:51:47 -0400 |
commit | fde26a7c16c4662ede268bfd5cb1f61d6189dde2 (patch) | |
tree | 12b33770efdb598e8375bc58ce53bcad25e49cc4 | |
parent | bf64776864715f5fd707883625b40e61343e3df2 (diff) | |
download | runes-fde26a7c16c4662ede268bfd5cb1f61d6189dde2.tar.gz runes-fde26a7c16c4662ede268bfd5cb1f61d6189dde2.zip |
this is only necessary if we're actually drawing things
-rw-r--r-- | display.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -37,11 +37,11 @@ void runes_display_get_term_size(RunesTerm *t, int *row, int *col, int *xpixel, void runes_display_glyph(RunesTerm *t, char *buf, size_t len) { - cairo_font_extents_t extents; + if (len) { + cairo_font_extents_t extents; - cairo_font_extents(t->cr, &extents); + cairo_font_extents(t->cr, &extents); - if (len) { char *nl; buf[len] = '\0'; while ((nl = strchr(buf, '\n'))) { |