wayland: fix NULL pointer dereference
This commit is contained in:
parent
3acffdb194
commit
af49b76586
@ -284,9 +284,11 @@ static void layer_surface_handle_configure(void *data,
|
|||||||
static void layer_surface_handle_closed(void *data,
|
static void layer_surface_handle_closed(void *data,
|
||||||
struct zwlr_layer_surface_v1 *surface) {
|
struct zwlr_layer_surface_v1 *surface) {
|
||||||
LOG_I("Destroying layer");
|
LOG_I("Destroying layer");
|
||||||
|
if (ctx.layer_surface)
|
||||||
zwlr_layer_surface_v1_destroy(ctx.layer_surface);
|
zwlr_layer_surface_v1_destroy(ctx.layer_surface);
|
||||||
ctx.layer_surface = NULL;
|
ctx.layer_surface = NULL;
|
||||||
|
|
||||||
|
if (ctx.surface)
|
||||||
wl_surface_destroy(ctx.surface);
|
wl_surface_destroy(ctx.surface);
|
||||||
ctx.surface = NULL;
|
ctx.surface = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user