Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
if (!islist(ctx, list)) {
fprintf(f, "%u is not a display list ID\n", list);
- return;
+ goto out;
}
dlist = _mesa_lookup_list(ctx, list);
if (!dlist) {
- if (fname) {
- fclose(f);
- }
- return;
+ goto out;
}
n = dlist->Head;
printf
("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n",
opcode, (void *) n);
- return;
+ goto out;
}
else {
fprintf(f, "command %d, %u operands\n", opcode,
}
}
+ out:
fflush(f);
if (fname)
fclose(f);