diff options
| author | 2022-09-25 21:55:29 +0200 | |
|---|---|---|
| committer | 2022-09-25 21:55:29 +0200 | |
| commit | a63c9c24c1b3f6c46ff1bc7a3428e8f50b4b1318 (patch) | |
| tree | 9330dc31e48e244fd5ae7e938eaead65493e36f8 | |
| parent | Always write a raw payload in srv_archive(). (diff) | |
| download | snac2-a63c9c24c1b3f6c46ff1bc7a3428e8f50b4b1318.tar.gz snac2-a63c9c24c1b3f6c46ff1bc7a3428e8f50b4b1318.tar.xz snac2-a63c9c24c1b3f6c46ff1bc7a3428e8f50b4b1318.zip | |
Avoid crashing on empty q_items.
Diffstat (limited to '')
| -rw-r--r-- | activitypub.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 3c8204b..39fcdfe 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -341,6 +341,11 @@ void process_queue(snac *snac) | |||
| 341 | xs *q_item = dequeue(snac, fn); | 341 | xs *q_item = dequeue(snac, fn); |
| 342 | char *type; | 342 | char *type; |
| 343 | 343 | ||
| 344 | if (q_item == NULL) { | ||
| 345 | snac_log(snac, xs_fmt("process_queue q_item error")); | ||
| 346 | continue; | ||
| 347 | } | ||
| 348 | |||
| 344 | if ((type = xs_dict_get(q_item, "type")) == NULL) | 349 | if ((type = xs_dict_get(q_item, "type")) == NULL) |
| 345 | type = "output"; | 350 | type = "output"; |
| 346 | 351 | ||