]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/SVNDirectory.cxx
Fix #1163
[simgear.git] / simgear / io / SVNDirectory.cxx
index cc572fc11da25dff410a0125f1b544e9db760923..923993ac4b1df6c6ab23052d1fbeac1e9f5797a5 100644 (file)
@@ -247,8 +247,6 @@ void SVNDirectory::deleteChildByName(const std::string& nm)
     }
 
     SGPath path = fsDir().file(nm);
-    dav->removeChild(child);
-    delete child;
     
     if (child->isCollection()) {
         Dir d(path);
@@ -264,7 +262,10 @@ void SVNDirectory::deleteChildByName(const std::string& nm)
     } else {
         path.remove();
     }
-    
+
+    dav->removeChild(child);
+    delete child;
+
     writeCache();
 }