mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
pango: fix gegl crash when no font is installed
https://gitlab.gnome.org/GNOME/pango/-/issues/701
This commit is contained in:
parent
af67c6155f
commit
d178443e23
2 changed files with 22 additions and 1 deletions
21
srcpkgs/pango/patches/fix-segfault-no-font.patch
Normal file
21
srcpkgs/pango/patches/fix-segfault-no-font.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
|
||||||
|
index a1c47203..b8eeede0 100644
|
||||||
|
--- a/pango/pango-layout.c
|
||||||
|
+++ b/pango/pango-layout.c
|
||||||
|
@@ -5707,13 +5707,14 @@ pango_layout_run_get_extents_and_height (PangoLayoutRun *run,
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- double xscale, yscale;
|
||||||
|
+ double xscale = 0, yscale = 0;
|
||||||
|
|
||||||
|
if (!metrics)
|
||||||
|
metrics = pango_font_get_metrics (run->item->analysis.font,
|
||||||
|
run->item->analysis.language);
|
||||||
|
|
||||||
|
- pango_font_get_scale_factors (run->item->analysis.font, &xscale, &yscale);
|
||||||
|
+ if (G_LIKELY(run->item->analysis.font))
|
||||||
|
+ pango_font_get_scale_factors (run->item->analysis.font, &xscale, &yscale);
|
||||||
|
*height = pango_font_metrics_get_height (metrics) * MAX (xscale, yscale);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'pango'
|
# Template file for 'pango'
|
||||||
pkgname=pango
|
pkgname=pango
|
||||||
version=1.50.10
|
version=1.50.10
|
||||||
revision=1
|
revision=2
|
||||||
build_style=meson
|
build_style=meson
|
||||||
build_helper=gir
|
build_helper=gir
|
||||||
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)"
|
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue