Handle malloc failure in ipc_recv_response

This commit is contained in:
Drew DeVault 2016-12-15 17:05:12 -05:00
parent 6c0fc20936
commit 9ad1e6b40f
3 changed files with 24 additions and 3 deletions

View file

@ -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);