diff options
-rw-r--r-- | sway/ipc-server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 2c642a37..69009f25 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c | |||
@@ -664,7 +664,7 @@ void ipc_client_handle_command(struct ipc_client *client) { | |||
664 | { | 664 | { |
665 | // TODO: Check if they're permitted to use these events | 665 | // TODO: Check if they're permitted to use these events |
666 | struct json_object *request = json_tokener_parse(buf); | 666 | struct json_object *request = json_tokener_parse(buf); |
667 | if (request == NULL) { | 667 | if (request == NULL || !json_object_is_type(request, json_type_array)) { |
668 | const char msg[] = "{\"success\": false}"; | 668 | const char msg[] = "{\"success\": false}"; |
669 | client_valid = ipc_send_reply(client, msg, strlen(msg)); | 669 | client_valid = ipc_send_reply(client, msg, strlen(msg)); |
670 | wlr_log(WLR_INFO, "Failed to parse subscribe request"); | 670 | wlr_log(WLR_INFO, "Failed to parse subscribe request"); |