forked from AuroraMiddleware/gtk
Fix warnings in the font options code
This code gets called before a screen is set.
This commit is contained in:
parent
a0e8d8db0b
commit
28e1ed4f2a
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user