core/context: Fix if/else cascade for disabled native backend

If the native backend is disabled but X11 and wayland are enabled, there
is a free standing else. Fix this by relying on the returns for control
flow.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4123>
This commit is contained in:
Sebastian Wick 2024-11-06 15:43:06 +01:00 committed by Marge Bot
parent 55910e467f
commit 6b72184173

View File

@ -511,13 +511,12 @@ meta_context_main_create_backend (MetaContext *context,
#ifdef HAVE_X11
if (context_main->options.nested)
return create_nested_backend (context, error);
else
#endif
#ifdef HAVE_NATIVE_BACKEND
if (context_main->options.headless)
return create_headless_backend (context, error);
else
return create_native_backend (context, error);
return create_native_backend (context, error);
#endif /* HAVE_NATIVE_BACKEND */
#else /* HAVE_WAYLAND */
g_assert_not_reached ();