diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-12-17 13:23:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-17 13:23:44 -0500 |
commit | f04ee0e68d885d7e1101cc88f9a9337202041f1f (patch) | |
tree | fa4dc296a5f1377867752d320ceef4e4b0178bbf /swaybar/ipc.c | |
parent | 6c0fc2093641868df28c4087902a040f7fae05d4 (diff) | |
parent | d859f825d3612492678f5cd6cc6dc1f2647929e1 (diff) |
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) { 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); |