From 2c9b47ff3c7fc7c5ce8b48952d14262652bb9f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 25 Apr 2024 22:46:35 +0300 Subject: [PATCH] Don't crash if snapshotting a GtkGraphicsOffload without child --- gtk/gtkgraphicsoffload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkgraphicsoffload.c b/gtk/gtkgraphicsoffload.c index 4ad2c424da..97d07bf47d 100644 --- a/gtk/gtkgraphicsoffload.c +++ b/gtk/gtkgraphicsoffload.c @@ -226,7 +226,8 @@ gtk_graphics_offload_snapshot (GtkWidget *widget, gtk_widget_get_width (widget), gtk_widget_get_height (widget))); - gtk_widget_snapshot_child (widget, self->child, snapshot); + if (self->child) + gtk_widget_snapshot_child (widget, self->child, snapshot); if (self->subsurface) gtk_snapshot_pop (snapshot);