mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-25 06:59:50 -05:00
opt: avoid use ipc in destroyed monitor
This commit is contained in:
parent
d8f1ee8cc6
commit
8852dabd48
1 changed files with 4 additions and 1 deletions
5
maomao.c
5
maomao.c
|
|
@ -2830,7 +2830,10 @@ void
|
||||||
dwl_ipc_manager_get_output(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *output)
|
dwl_ipc_manager_get_output(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *output)
|
||||||
{
|
{
|
||||||
DwlIpcOutput *ipc_output;
|
DwlIpcOutput *ipc_output;
|
||||||
Monitor *monitor = wlr_output_from_resource(output)->data;
|
struct wlr_output *op = wlr_output_from_resource(output);
|
||||||
|
if(!op)
|
||||||
|
return;
|
||||||
|
Monitor *monitor = op->data;
|
||||||
struct wl_resource *output_resource = wl_resource_create(client, &zdwl_ipc_output_v2_interface, wl_resource_get_version(resource), id);
|
struct wl_resource *output_resource = wl_resource_create(client, &zdwl_ipc_output_v2_interface, wl_resource_get_version(resource), id);
|
||||||
if (!output_resource)
|
if (!output_resource)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue