mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Avoid crashing on empty q_items.
This commit is contained in:
parent
64b7b66e3b
commit
a63c9c24c1
1 changed files with 5 additions and 0 deletions
|
@ -341,6 +341,11 @@ void process_queue(snac *snac)
|
||||||
xs *q_item = dequeue(snac, fn);
|
xs *q_item = dequeue(snac, fn);
|
||||||
char *type;
|
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)
|
if ((type = xs_dict_get(q_item, "type")) == NULL)
|
||||||
type = "output";
|
type = "output";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue