From 20cb147c1f9d44459acaa804cefccd319823ff95 Mon Sep 17 00:00:00 2001
From: Ludovico de Nittis <ludovico.denittis@collabora.com>
Date: Thu, 21 Jan 2021 12:54:10 +0100
Subject: [PATCH] xdg-portal: Do not use local_error's message when it is NULL

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
---
 steam-runtime-tools/xdg-portal.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/steam-runtime-tools/xdg-portal.c b/steam-runtime-tools/xdg-portal.c
index fb3c56a95..19361224f 100644
--- a/steam-runtime-tools/xdg-portal.c
+++ b/steam-runtime-tools/xdg-portal.c
@@ -611,7 +611,8 @@ _srt_check_xdg_portals (gchar **envp,
       g_debug ("The helper output is not a JSON object");
       issues |= SRT_XDG_PORTAL_ISSUES_UNKNOWN;
       if (details_out != NULL)
-        *details_out = _srt_xdg_portal_new (local_error->message, issues, NULL, NULL);
+        *details_out = _srt_xdg_portal_new ("Helper output is not a JSON object",
+                                            issues, NULL, NULL);
       return issues;
     }
 
@@ -622,7 +623,8 @@ _srt_check_xdg_portals (gchar **envp,
       g_debug ("The helper output JSON is malformed or incomplete");
       issues |= SRT_XDG_PORTAL_ISSUES_UNKNOWN;
       if (details_out != NULL)
-        *details_out = _srt_xdg_portal_new (local_error->message, issues, NULL, NULL);
+        *details_out = _srt_xdg_portal_new ("Helper output does not contain 'interfaces'",
+                                            issues, NULL, NULL);
       return issues;
     }
 
-- 
GitLab