diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2015-10-28 10:45:20 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2015-11-06 17:03:59 -0500 |
commit | 7fb3ecc12ccd8e633c6a3bfb6ffe3456f1d95bba (patch) | |
tree | ba50973785fb9ebc483da0fb799ada9f16090cc6 /src/backends/native/meta-backend-native.c | |
parent | 4c9af7267d20ec31d57f1bd1c334b316fb681fa9 (diff) | |
download | mutter-7fb3ecc12ccd8e633c6a3bfb6ffe3456f1d95bba.tar.gz |
MetaLauncher: Don't g_error() on failure
g_error() is the wrong thing to do when, for example, we can't find the
DRM device, since Mutter should just fail to start rather than reporting
a bug into automatic bug tracking systems. Rather than trying to decipher
which errors are "expected" and which not, just make all failure paths
in meta_launcher_new() return a GError out to the caller - which we make
exit(1).
https://bugzilla.gnome.org/show_bug.cgi?id=757311
Diffstat (limited to 'src/backends/native/meta-backend-native.c')
-rw-r--r-- | src/backends/native/meta-backend-native.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 96eb9fc0e..d22bed10a 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -37,6 +37,8 @@ #include "meta-cursor-renderer-native.h" #include "meta-launcher.h" +#include <stdlib.h> + struct _MetaBackendNativePrivate { MetaLauncher *launcher; @@ -327,8 +329,15 @@ static void meta_backend_native_init (MetaBackendNative *native) { MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native); + GError *error = NULL; + + priv->launcher = meta_launcher_new (&error); + if (priv->launcher == NULL) + { + g_warning ("Can't initialize KMS backend: %s\n", error->message); + exit (1); + } - priv->launcher = meta_launcher_new (); priv->barrier_manager = meta_barrier_manager_native_new (); priv->up_client = up_client_new (); |