diff options
author | 2016-12-17 13:23:44 -0500 | |
---|---|---|
committer | 2016-12-17 13:23:44 -0500 | |
commit | f04ee0e68d885d7e1101cc88f9a9337202041f1f (patch) | |
tree | fa4dc296a5f1377867752d320ceef4e4b0178bbf /swaybar/ipc.c | |
parent | Merge pull request #991 from barfoo1/registry_fix (diff) | |
parent | Fix build error (diff) | |
download | sway-f04ee0e68d885d7e1101cc88f9a9337202041f1f.tar.gz sway-f04ee0e68d885d7e1101cc88f9a9337202041f1f.tar.zst sway-f04ee0e68d885d7e1101cc88f9a9337202041f1f.zip |
Merge pull request #995 from SirCmpwn/memory-use
Handle allocation failures
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r-- | swaybar/ipc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c index 8d2f4e9a..f2da7392 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c | |||
@@ -331,6 +331,9 @@ void ipc_bar_init(struct bar *bar, const char *bar_id) { | |||
331 | 331 | ||
332 | bool handle_ipc_event(struct bar *bar) { | 332 | bool handle_ipc_event(struct bar *bar) { |
333 | struct ipc_response *resp = ipc_recv_response(bar->ipc_event_socketfd); | 333 | struct ipc_response *resp = ipc_recv_response(bar->ipc_event_socketfd); |
334 | if (!resp) { | ||
335 | return false; | ||
336 | } | ||
334 | switch (resp->type) { | 337 | switch (resp->type) { |
335 | case IPC_EVENT_WORKSPACE: | 338 | case IPC_EVENT_WORKSPACE: |
336 | ipc_update_workspaces(bar); | 339 | ipc_update_workspaces(bar); |