diff --git a/simgear/scene/tgdb/SGBuildingBin.cxx b/simgear/scene/tgdb/SGBuildingBin.cxx index 386db9db..0c7a8d82 100644 --- a/simgear/scene/tgdb/SGBuildingBin.cxx +++ b/simgear/scene/tgdb/SGBuildingBin.cxx @@ -466,8 +466,8 @@ typedef QuadTreeBuilder> x >> y >> z >> r >> b; - if (in.failbit) { - SG_LOG(SG_TERRAIN, SG_WARN, "Error parsing build entry in: " << absoluteFileName); + if (in.bad() || in.fail()) { + SG_LOG(SG_TERRAIN, SG_WARN, "Error parsing build entry in: " << absoluteFileName << " line: \"" << line << "\""); continue; }