Accepting request 1006200 from GNOME:Next

- Add 639.patch: layout: Fix crash when no font is installed.

OBS-URL: https://build.opensuse.org/request/show/1006200
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/pango?expand=0&rev=242
This commit is contained in:
Bjørn Lie 2022-09-27 20:44:22 +00:00 committed by Git OBS Bridge
parent ac900347fc
commit 21b98facf5
3 changed files with 42 additions and 1 deletions

34
639.patch Normal file
View File

@ -0,0 +1,34 @@
From 2771f621ed31deeae6c7ad984db1e5aa33f08a3c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Thu, 22 Sep 2022 16:12:37 -0700
Subject: [PATCH] layout: Fix crash when no font is installed
Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/701
---
pango/pango-layout.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index a1c472039..b8eeede00 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);
}
}
--
GitLab

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Sep 25 20:07:33 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
- Add 639.patch: layout: Fix crash when no font is installed.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 16 16:59:29 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com> Fri Sep 16 16:59:29 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@ -26,6 +26,8 @@ URL: https://pango.gnome.org/
Source0: %{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
Source2: macros.pango Source2: macros.pango
Source99: baselibs.conf Source99: baselibs.conf
# PATCH-FIX-UPSTREAM 639.patch -- layout: Fix crash when no font is installed
Patch0: https://gitlab.gnome.org/GNOME/pango/-/merge_requests/639.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: help2man BuildRequires: help2man
@ -117,7 +119,7 @@ This package contains all necessary include files and libraries needed
to develop applications that require these. to develop applications that require these.
%prep %prep
%setup %autosetup -p1
%build %build
%meson \ %meson \