print: Avoid calling gdk_display_get_default
Check if GTK has been initialized before trying to get a display in a class_init function. The introspection property dumper code will instantiate all types and run into the new introduced errors if we try to get a display in class_init.
This commit is contained in:
@@ -368,6 +368,9 @@ ensure_fallback_style (void)
|
||||
GdkDisplay *display;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
if (!gtk_is_initialized ())
|
||||
return;
|
||||
|
||||
display = gdk_display_get_default ();
|
||||
if (!display)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user