mirror of
https://github.com/swaywm/sway.git
synced 2026-03-06 01:40:42 -05:00
Handle malloc failure in ipc_recv_response
This commit is contained in:
parent
6c0fc20936
commit
9ad1e6b40f
3 changed files with 24 additions and 3 deletions
|
|
@ -331,6 +331,9 @@ void ipc_bar_init(struct bar *bar, const char *bar_id) {
|
|||
|
||||
bool handle_ipc_event(struct bar *bar) {
|
||||
struct ipc_response *resp = ipc_recv_response(bar->ipc_event_socketfd);
|
||||
if (!resp) {
|
||||
return false;
|
||||
}
|
||||
switch (resp->type) {
|
||||
case IPC_EVENT_WORKSPACE:
|
||||
ipc_update_workspaces(bar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue