From 4c7342b5c5456c51ba77293c56129b672256431a Mon Sep 17 00:00:00 2001 From: save196 Date: Wed, 25 Feb 2026 11:58:56 +0200 Subject: [PATCH] Handle NULL head in overlay resize/draw --- src/overlay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/overlay.c b/src/overlay.c index 803cbaf..5be9b27 100644 --- a/src/overlay.c +++ b/src/overlay.c @@ -64,6 +64,8 @@ static void resize(struct wd_output *output) { return; struct wd_head *head = wd_find_head(output->state, output); + if (head == NULL) + return; uint32_t screen_width = head->custom_mode.width; uint32_t screen_height = head->custom_mode.height; @@ -144,6 +146,8 @@ void window_map(GtkWidget *widget, gpointer data) { gboolean window_draw(GtkWidget *widget, cairo_t *cr, gpointer data) { struct wd_output *output = data; struct wd_head *head = wd_find_head(output->state, output); + if (head == NULL) + return TRUE; GtkStyleContext *style_ctx = gtk_widget_get_style_context(widget); GdkRGBA fg;