Fix warnings in the font options code

This code gets called before a screen is set.
This commit is contained in:
Matthias Clasen 2015-07-01 23:36:29 -07:00
parent a0e8d8db0b
commit 28e1ed4f2a

View File

@ -10336,7 +10336,7 @@ update_pango_context (GtkWidget *widget,
100));
screen = gtk_widget_get_screen_unchecked (widget);
if (widget->priv->font_options)
if (screen && widget->priv->font_options)
{
cairo_font_options_t *options;
@ -10345,7 +10345,7 @@ update_pango_context (GtkWidget *widget,
pango_cairo_context_set_font_options (context, options);
cairo_font_options_destroy (options);
}
else
else if (screen)
{
pango_cairo_context_set_font_options (context,
gdk_screen_get_font_options (screen));