[gnome-builder/wip/gtk4-port: 676/736] libide/code: be more defensive against missing style
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 676/736] libide/code: be more defensive against missing style
- Date: Tue, 26 Apr 2022 01:46:35 +0000 (UTC)
commit 95d4eb70b7b920d9e29bfb1ed454e4fce238018f
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 20 12:13:26 2022 -0700
libide/code: be more defensive against missing style
src/libide/code/ide-highlight-engine.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/code/ide-highlight-engine.c b/src/libide/code/ide-highlight-engine.c
index 3964600ab..9b96d2aaa 100644
--- a/src/libide/code/ide-highlight-engine.c
+++ b/src/libide/code/ide-highlight-engine.c
@@ -172,9 +172,8 @@ sync_tag_style (GtkSourceStyleScheme *style_scheme,
style_name = tag_name;
/*
- * Check if this is a private tag.A tag is private if it starts with
- * PRIVATE_TAG_PREFIX "Builder".
- * ex: Builder:c:boolean
+ * Check if this is a private tag. A tag is private if it starts with
+ * PRIVATE_TAG_PREFIX "Builder" such as "Builder:c:boolean".
* If the tag is private extract the original style name by moving the string
* strlen (PRIVATE_TAG_PREFIX) + 1 (the colon) characters.
*/
@@ -193,6 +192,9 @@ sync_tag_style (GtkSourceStyleScheme *style_scheme,
}
}
+ if (style == NULL)
+ return;
+
g_object_get (style,
"background", &background,
"background-set", &background_set,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]