mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Avoid crashing on empty q_items.
This commit is contained in:
parent
64b7b66e3b
commit
a63c9c24c1
@ -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 New Issue
Block a user