# HG changeset patch # User Chris Cannam # Date 1536144999 -3600 # Node ID 3299b42d8bdd17f5b189651571d50fcb6d980fea # Parent b837ccdd4946f3cd9c06d7f0f0660a9ed654aa8e Don't try to continue after what should have been a terminal problem diff -r b837ccdd4946 -r 3299b42d8bdd data/fileio/CSVFileReader.cpp --- a/data/fileio/CSVFileReader.cpp Tue Sep 04 14:11:10 2018 +0100 +++ b/data/fileio/CSVFileReader.cpp Wed Sep 05 11:56:39 2018 +0100 @@ -229,7 +229,9 @@ } } - while (!in.atEnd()) { + bool abandoned = false; + + while (!in.atEnd() && !abandoned) { // QTextStream's readLine doesn't cope with old-style Mac // CR-only line endings. Why did they bother making the class @@ -249,6 +251,7 @@ if (m_reporter) { if (m_reporter->wasCancelled()) { + abandoned = true; break; } int progress; @@ -327,6 +330,7 @@ model1 = 0; model2 = 0; model2a = 0; model2b = 0; model3 = 0; modelW = 0; } + abandoned = true; break; }