mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
tree/container: fix null pointer dereferencing
This commit is contained in:
parent
f7568e26e9
commit
ee2c357ec2
1 changed files with 3 additions and 0 deletions
|
|
@ -303,6 +303,9 @@ static struct sway_container *floating_container_at(double lx, double ly,
|
||||||
struct sway_container *tiling_container_at(struct sway_node *parent,
|
struct sway_container *tiling_container_at(struct sway_node *parent,
|
||||||
double lx, double ly,
|
double lx, double ly,
|
||||||
struct wlr_surface **surface, double *sx, double *sy) {
|
struct wlr_surface **surface, double *sx, double *sy) {
|
||||||
|
if (parent == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (node_is_view(parent)) {
|
if (node_is_view(parent)) {
|
||||||
surface_at_view(parent->sway_container, lx, ly, surface, sx, sy);
|
surface_at_view(parent->sway_container, lx, ly, surface, sx, sy);
|
||||||
return parent->sway_container;
|
return parent->sway_container;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue