From 9e3ff7706f2de9ef8c45b3d0f748ec3a833c7e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= Date: Fri, 2 Aug 2024 18:43:52 +0200 Subject: [PATCH] Don't try to show recipe with invalid ID Closes: https://gitlab.gnome.org/GNOME/recipes/-/issues/140 --- src/gr-app.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gr-app.c b/src/gr-app.c index 140e3598..6f6b02f0 100644 --- a/src/gr-app.c +++ b/src/gr-app.c @@ -171,7 +171,8 @@ details_activated (GSimpleAction *action, gr_app_activate (G_APPLICATION (app)); win = gtk_application_get_active_window (GTK_APPLICATION (app)); recipe = gr_recipe_store_get_recipe (gr_recipe_store_get (), id); - gr_window_show_recipe (GR_WINDOW (win), recipe); + if (recipe) + gr_window_show_recipe (GR_WINDOW (win), recipe); } static void -- GitLab