From eeea79bb9ff81832fef28cefd697b8c352a9bb15 Mon Sep 17 00:00:00 2001 From: John Cardullo Date: Tue, 27 Oct 2026 01:45:24 -0700 Subject: [PATCH] gui/search-button: Disable popover arrow and guard markup escaping The search suggestions popover is styled as a menu ("menu" style) below the search entry. In recent GTK 4, when has-arrow is TRUE (the default) and the popover has no arrow geometry or valid parent coordinates, gtk_popover_create_arrow_path() returns NULL, leaving arrow_render_node NULL. gtk_popover_snapshot() then appends NULL to the snapshot, causing a fatal critical crash (GSK_IS_RENDER_NODE assertion failed) upon showing search results. Setting "has-arrow: false" matches the menu popover design and avoids the crash. Also guard escape_markup_cb() against NULL strings. Part-of: --- src/gui/gcal-search-button.blp | 1 + src/gui/gcal-search-button.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/gui/gcal-search-button.blp b/src/gui/gcal-search-button.blp index a500ba87..e4219dba 100644 --- a/src/gui/gcal-search-button.blp +++ b/src/gui/gcal-search-button.blp @@ -76,6 +76,7 @@ template $GcalSearchButton: Adw.Bin { Popover popover { position: bottom; autohide: false; + has-arrow: false; default-widget: results_listview; styles [ diff --git a/src/gui/gcal-search-button.c b/src/gui/gcal-search-button.c index e6f75623..f13a5087 100644 --- a/src/gui/gcal-search-button.c +++ b/src/gui/gcal-search-button.c @@ -116,6 +116,9 @@ escape_markup_cb (GcalSearchHit *hit, { g_autofree gchar *escaped_string = NULL; + if (!string) + return NULL; + escaped_string = g_markup_escape_text (string, -1); escaped_string = g_strstrip (escaped_string);