1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-22 08:51:53 +02:00

dump.c (order_vecs): don't trip over vectors with deferred resolution

This caused segfaults in code view and dumping with -T -T.
This commit is contained in:
Werner Almesberger 2015-01-07 19:56:25 -03:00
parent 8a1a310396
commit ad2c07f49c

11
dump.c
View File

@ -1,8 +1,8 @@
/* /*
* dump.c - Dump objects in the native FPD format * dump.c - Dump objects in the native FPD format
* *
* Written 2009-2012, 2014 by Werner Almesberger * Written 2009-2012, 2014-2015 by Werner Almesberger
* Copyright 2009-2012, 2014 by Werner Almesberger * Copyright 2009-2012, 2014-2015 by Werner Almesberger
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -170,10 +170,13 @@ static void order_vecs(struct order **curr, struct vec *vecs)
{ {
struct vec *vec; struct vec *vec;
for (vec = vecs; vec; vec = vec->next) for (vec = vecs; vec; vec = vec->next) {
if (!vec->base || n_vec_refs(vec->base) != 1) const char *name = (const char *) vec->base;
if (!vec->base || *name || n_vec_refs(vec->base) != 1)
recurse_vec(curr, vec); recurse_vec(curr, vec);
} }
}
struct order *order_frame(const struct frame *frame) struct order *order_frame(const struct frame *frame)