[gnome-shell] st/theme-node: Only try to parse non-empty inline styles
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st/theme-node: Only try to parse non-empty inline styles
- Date: Fri, 29 Apr 2022 21:55:17 +0000 (UTC)
commit f0a04719271e4b9d148362205c2379ef25f7c89b
Author: Sebastian Keller <skeller gnome org>
Date: Fri Apr 29 23:30:21 2022 +0200
st/theme-node: Only try to parse non-empty inline styles
Otherwise cr_parser_new_from_buf() will fail creating a parser for a
buffer of length 0, resulting in further errors due to the parser being
NULL. This could happen when extensions were trying to set the style of
a widget to an empty string.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4634
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2286>
src/st/st-theme-node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c
index 13dbca88fd..6e09c3939a 100644
--- a/src/st/st-theme-node.c
+++ b/src/st/st-theme-node.c
@@ -456,7 +456,7 @@ ensure_properties (StThemeNode *node)
if (node->theme)
properties = _st_theme_get_matched_properties (node->theme, node);
- if (node->inline_style)
+ if (node->inline_style && *node->inline_style != '\0')
{
CRDeclaration *cur_decl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]