mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 11:25:59 +01:00
virtualkeyboard: check if VirtualKeyboard is valid before accessing client. (#6460)
This fixes crash when restarting fcitx (#6378)
This commit is contained in:
parent
d677ac6f87
commit
a54f98c203
2 changed files with 4 additions and 4 deletions
|
@ -81,7 +81,7 @@ SP<CInputMethodV2> CInputMethodKeyboardGrabV2::getOwner() {
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_client* CInputMethodKeyboardGrabV2::client() {
|
wl_client* CInputMethodKeyboardGrabV2::client() {
|
||||||
return resource->client();
|
return resource->resource() ? resource->client() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
CInputMethodPopupV2::CInputMethodPopupV2(SP<CZwpInputPopupSurfaceV2> resource_, SP<CInputMethodV2> owner_, SP<CWLSurfaceResource> surface) : resource(resource_), owner(owner_) {
|
CInputMethodPopupV2::CInputMethodPopupV2(SP<CZwpInputPopupSurfaceV2> resource_, SP<CInputMethodV2> owner_, SP<CWLSurfaceResource> surface) : resource(resource_), owner(owner_) {
|
||||||
|
|
|
@ -100,7 +100,7 @@ wlr_keyboard* CVirtualKeyboardV1Resource::wlr() {
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_client* CVirtualKeyboardV1Resource::client() {
|
wl_client* CVirtualKeyboardV1Resource::client() {
|
||||||
return resource->client();
|
return resource->resource() ? resource->client() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVirtualKeyboardV1Resource::releasePressed() {
|
void CVirtualKeyboardV1Resource::releasePressed() {
|
||||||
|
|
Loading…
Reference in a new issue