mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Don't assume xdg_surface.{toplevel,popup} is non-NULL
This assumption will become incorrect with future commits.
This commit is contained in:
parent
f0cc712af1
commit
10ba8ebc70
4 changed files with 44 additions and 20 deletions
|
|
@ -59,8 +59,10 @@ static void scene_xdg_surface_update_position(
|
|||
|
||||
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
|
||||
struct wlr_xdg_popup *popup = xdg_surface->popup;
|
||||
wlr_scene_node_set_position(&scene_xdg_surface->tree->node,
|
||||
popup->current.geometry.x, popup->current.geometry.y);
|
||||
if (popup != NULL) {
|
||||
wlr_scene_node_set_position(&scene_xdg_surface->tree->node,
|
||||
popup->current.geometry.x, popup->current.geometry.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue