[gtksourceview/wip/chergert/gsv-gtk4: 165/189] view: check for style scheme before applying
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/gsv-gtk4: 165/189] view: check for style scheme before applying
- Date: Mon, 22 Jun 2020 21:59:52 +0000 (UTC)
commit bf020e7af9ce5846a435cc968121d5f4f60457c7
Author: Christian Hergert <chergert redhat com>
Date: Thu Apr 2 17:40:36 2020 -0700
view: check for style scheme before applying
gtksourceview/gtksourceview.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index e04f305b..d85c836f 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -4715,8 +4715,11 @@ gtk_source_view_get_gutter (GtkSourceView *view,
gtk_text_view_set_gutter (GTK_TEXT_VIEW (view),
GTK_TEXT_WINDOW_LEFT,
GTK_WIDGET (priv->left_gutter));
- _gtk_source_style_scheme_apply (priv->style_scheme,
- GTK_WIDGET (priv->left_gutter));
+ if (priv->style_scheme != NULL)
+ {
+ _gtk_source_style_scheme_apply (priv->style_scheme,
+ GTK_WIDGET (priv->left_gutter));
+ }
}
return priv->left_gutter;
@@ -4729,8 +4732,11 @@ gtk_source_view_get_gutter (GtkSourceView *view,
gtk_text_view_set_gutter (GTK_TEXT_VIEW (view),
GTK_TEXT_WINDOW_RIGHT,
GTK_WIDGET (priv->right_gutter));
- _gtk_source_style_scheme_apply (priv->style_scheme,
- GTK_WIDGET (priv->right_gutter));
+ if (priv->style_scheme != NULL)
+ {
+ _gtk_source_style_scheme_apply (priv->style_scheme,
+ GTK_WIDGET (priv->right_gutter));
+ }
}
return priv->right_gutter;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]