Avoid crashing on empty q_items.

This commit is contained in:
default 2022-09-25 21:55:29 +02:00
parent 64b7b66e3b
commit a63c9c24c1

View File

@ -341,6 +341,11 @@ void process_queue(snac *snac)
xs *q_item = dequeue(snac, fn);
char *type;
if (q_item == NULL) {
snac_log(snac, xs_fmt("process_queue q_item error"));
continue;
}
if ((type = xs_dict_get(q_item, "type")) == NULL)
type = "output";