ltlcross: fix --verbose --no-check crash

Report from František Blahoudek.

* bin/ltlcross.cc: Do not display stats for automata
that do not exist.
* tests/core/ltlcross3.test: Test it.
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2016-10-13 13:53:42 +02:00
parent ad502eb324
commit cc1191cd66
3 changed files with 11 additions and 3 deletions

View file

@ -1066,6 +1066,8 @@ namespace
auto tmp = [&](std::vector<spot::twa_graph_ptr>& x, unsigned i,
const char prefix)
{
if (!x[i])
return;
std::cerr << "info: " << prefix << i << "\t(";
printsize(x[i]);
std::cerr << ')';
@ -1094,7 +1096,7 @@ namespace
std::vector<spot::twa_graph_ptr>& to, unsigned i,
char prefix)
{
if (!to[i])
if (from[i] && !to[i])
{
if (print_first)
{