From e03bc36f63c0031e742db1619bb221fe36461ceb Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Thu, 21 Jul 2022 16:26:06 +0200 Subject: Print errors from launching new instances --- fiv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fiv.c b/fiv.c index 7599105..b190922 100644 --- a/fiv.c +++ b/fiv.c @@ -873,9 +873,11 @@ spawn_uri(const char *uri) { char *argv[] = {PROJECT_NAME, (char *) uri, NULL}; GError *error = NULL; - g_spawn_async( - NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error); - g_clear_error(&error); + if (!g_spawn_async( + NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error)) { + g_warning("%s", error->message); + g_error_free(error); + } } static void -- cgit v1.2.3-70-g09d2