]> git.mxchange.org Git - simgear.git/commitdiff
TerraSync: avoid assert on missing file
authorJames Turner <zakalawe@mac.com>
Tue, 5 Nov 2013 05:17:46 +0000 (05:17 +0000)
committerJames Turner <zakalawe@mac.com>
Tue, 5 Nov 2013 05:17:57 +0000 (05:17 +0000)
simgear/io/SVNReportParser.cxx

index 96b357f51e3e231b05c23e8dd7e6cafac4592abc..9a3077d269bf34fc731900f3523defa5d22fbcf3 100644 (file)
@@ -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