[mutter/wip/nielsdg/meta-launcher-fix-error-free] meta-launcher: g_propagate_*_error takes ownership
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/nielsdg/meta-launcher-fix-error-free] meta-launcher: g_propagate_*_error takes ownership
- Date: Tue, 12 Feb 2019 08:38:07 +0000 (UTC)
commit 5ea0de3620c8b9fc97915e276b273a1ca53796fb
Author: Niels De Graef <nielsdegraef gmail com>
Date: Tue Feb 12 09:34:06 2019 +0100
meta-launcher: g_propagate_*_error takes ownership
This means we need to make sure we don't accidentally free it (which
automatically happens with `g_autoptr`), so use `g_steal_pointer()`.
This fixes an issue where, when launched in a bubblewrap environment
(such as the one provided by Buildstream), we would get the following
warning message:
```
mutter-WARNING **: 8:31:35:069: Can't initialize KMS backend: (null)
```
... which isn't that useful when trying to debug the actual issue.
src/backends/native/meta-launcher.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index a43c1cc3d..93a1ca2f1 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -231,7 +231,9 @@ get_session_proxy (GCancellable *cancellable,
if (!find_systemd_session (&session_id, &local_error))
{
- g_propagate_prefixed_error (error, local_error, "Could not get session ID: ");
+ g_propagate_prefixed_error (error,
+ g_steal_pointer (&local_error),
+ "Could not get session ID: ");
return NULL;
}
@@ -465,7 +467,9 @@ get_seat_id (GError **error)
if (!find_systemd_session (&session_id, &local_error))
{
- g_propagate_prefixed_error (error, local_error, "Could not get session ID: ");
+ g_propagate_prefixed_error (error,
+ g_steal_pointer (&local_error),
+ "Could not get session ID: ");
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]