wayland/gtk-shell: Dereference surface after NULL check
Spotted by coverity. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2772>
This commit is contained in:
parent
a16df485db
commit
439856e7aa
@ -172,9 +172,8 @@ gtk_surface_request_focus (struct wl_client *client,
|
|||||||
{
|
{
|
||||||
MetaWaylandGtkSurface *gtk_surface = wl_resource_get_user_data (resource);
|
MetaWaylandGtkSurface *gtk_surface = wl_resource_get_user_data (resource);
|
||||||
MetaWaylandSurface *surface = gtk_surface->surface;
|
MetaWaylandSurface *surface = gtk_surface->surface;
|
||||||
MetaContext *context =
|
MetaContext *context;
|
||||||
meta_wayland_compositor_get_context (surface->compositor);
|
MetaDisplay *display;
|
||||||
MetaDisplay *display = meta_context_get_display (context);
|
|
||||||
MetaStartupSequence *sequence = NULL;
|
MetaStartupSequence *sequence = NULL;
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
|
|
||||||
@ -185,6 +184,9 @@ gtk_surface_request_focus (struct wl_client *client,
|
|||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
context = meta_wayland_compositor_get_context (surface->compositor);
|
||||||
|
display = meta_context_get_display (context);
|
||||||
|
|
||||||
if (startup_id)
|
if (startup_id)
|
||||||
sequence = meta_startup_notification_lookup_sequence (display->startup_notification,
|
sequence = meta_startup_notification_lookup_sequence (display->startup_notification,
|
||||||
startup_id);
|
startup_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user