[gtksourceview] gutter: short-circuit if there are no renderers



commit e61f859771212903e264c3476143eb2e4c1e1622
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 22 11:27:58 2021 -0700

    gutter: short-circuit if there are no renderers

 gtksourceview/gtksourcegutter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourcegutter.c b/gtksourceview/gtksourcegutter.c
index 72828939..cdfb47c3 100644
--- a/gtksourceview/gtksourcegutter.c
+++ b/gtksourceview/gtksourcegutter.c
@@ -716,7 +716,7 @@ gtk_source_gutter_snapshot (GtkWidget   *widget,
 
        g_clear_object (&gutter->lines);
 
-       if (text_view == NULL || gtk_widget_get_width (widget) == 0)
+       if (gutter->renderers == NULL || text_view == NULL || gtk_widget_get_width (widget) == 0)
        {
                return;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]