From: James Turner Date: Tue, 5 Nov 2013 05:17:46 +0000 (+0000) Subject: TerraSync: avoid assert on missing file X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=48f866dcc68fe6952e0de202ad182bd2fbdf6b4f;p=simgear.git TerraSync: avoid assert on missing file --- diff --git a/simgear/io/SVNReportParser.cxx b/simgear/io/SVNReportParser.cxx index 96b357f5..9a3077d2 100644 --- a/simgear/io/SVNReportParser.cxx +++ b/simgear/io/SVNReportParser.cxx @@ -392,7 +392,11 @@ public: finishFile(currentDir->addChildFile(currentPath.file())); } else if (!strcmp(name, SVN_OPEN_FILE_TAG)) { DAVResource* res = currentDir->collection()->childWithName(currentPath.file()); - assert(res); + if (!res) { + SG_LOG(SG_IO, SG_WARN, "SVN open-file: unknown: " << currentPath); + fail(SVNRepository::SVN_ERROR_IO); + return; + } finishFile(res); } else if (!strcmp(name, SVN_ADD_DIRECTORY_TAG)) { // pop directory