mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2024-11-22 23:45:58 +01:00
core: avoid calling inert parents
This commit is contained in:
parent
9eeabde74a
commit
1281c1ed53
1 changed files with 2 additions and 1 deletions
|
@ -516,7 +516,7 @@ static const wl_interface* dummyTypes[] = { nullptr };
|
||||||
SOURCE += std::format(R"#(
|
SOURCE += std::format(R"#(
|
||||||
static void {}(wl_client* client, wl_resource* resource{}) {{
|
static void {}(wl_client* client, wl_resource* resource{}) {{
|
||||||
const auto PO = ({}*)wl_resource_get_user_data(resource);
|
const auto PO = ({}*)wl_resource_get_user_data(resource);
|
||||||
if (PO->requests.{})
|
if (PO && PO->requests.{})
|
||||||
PO->requests.{}(PO{});
|
PO->requests.{}(PO{});
|
||||||
}}
|
}}
|
||||||
)#",
|
)#",
|
||||||
|
@ -727,6 +727,7 @@ const wl_interface {} = {{
|
||||||
// it means we need to destroy it.
|
// it means we need to destroy it.
|
||||||
if (wl_resource_get_user_data(pResource) == this)
|
if (wl_resource_get_user_data(pResource) == this)
|
||||||
wl_resource_destroy(pResource);
|
wl_resource_destroy(pResource);
|
||||||
|
wl_resource_set_user_data(pResource, nullptr);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
void {}::onDestroyCalled() {{
|
void {}::onDestroyCalled() {{
|
||||||
|
|
Loading…
Reference in a new issue