mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-04 04:20:24 -04:00
check null in toplevel_from_popup
managed to SEGFAULT the server by trying to create a popup without setting a parent first. Not sure if this is dwl or wlroots issue, so also opened a ticket upstream: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3811
This commit is contained in:
parent
8bd3442575
commit
f1639ba9d5
2 changed files with 5 additions and 1 deletions
4
client.h
4
client.h
|
@ -304,7 +304,9 @@ toplevel_from_popup(struct wlr_xdg_popup *popup)
|
|||
while (1) {
|
||||
switch (surface->role) {
|
||||
case WLR_XDG_SURFACE_ROLE_POPUP:
|
||||
if (wlr_surface_is_layer_surface(surface->popup->parent))
|
||||
if (!surface->popup->parent)
|
||||
return NULL;
|
||||
else if (wlr_surface_is_layer_surface(surface->popup->parent))
|
||||
return wlr_layer_surface_v1_from_wlr_surface(surface->popup->parent)->data;
|
||||
else if (!wlr_surface_is_xdg_surface(surface->popup->parent))
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue