aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-10-26 23:10:27 +0200
committerThomas White <taw@physics.org>2017-10-26 23:10:27 +0200
commit8f73f9916207bc9fc681e6cf4fef5673840e6568 (patch)
tree18e3a0ef8d541160077bb56efcc619201b6f2ac4
parent91ea6184b1eb7aabe2d5cd60f551e1a642201714 (diff)
Handle NULL PangoContext some more
-rw-r--r--src/sc_interp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c
index 56fae6a..fe563c2 100644
--- a/src/sc_interp.c
+++ b/src/sc_interp.c
@@ -298,6 +298,8 @@ static void update_font(SCInterpreter *scin)
PangoFontMetrics *metrics;
struct sc_state *st = &scin->state[scin->j];
+ if ( scin->pc == NULL ) return;
+
st->font = pango_font_map_load_font(pango_context_get_font_map(scin->pc),
scin->pc, st->fontdesc);
if ( st->font == NULL ) {