diff options
-rw-r--r-- | swaybar/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index d992b154..0a25d0f5 100644 --- a/swaybar/main.c +++ b/swaybar/main.c | |||
@@ -110,6 +110,10 @@ void ipc_update_workspaces() { | |||
110 | uint32_t len = 0; | 110 | uint32_t len = 0; |
111 | char *res = ipc_single_command(socketfd, IPC_GET_WORKSPACES, NULL, &len); | 111 | char *res = ipc_single_command(socketfd, IPC_GET_WORKSPACES, NULL, &len); |
112 | json_object *results = json_tokener_parse(res); | 112 | json_object *results = json_tokener_parse(res); |
113 | if (!results) { | ||
114 | free(res); | ||
115 | return; | ||
116 | } | ||
113 | 117 | ||
114 | int i; | 118 | int i; |
115 | for (i = 0; i < json_object_array_length(results); ++i) { | 119 | for (i = 0; i < json_object_array_length(results); ++i) { |